areadlinkat: fix fallback path
authorEric Blake <ebb9@byu.net>
Tue, 27 Oct 2009 03:41:21 +0000 (21:41 -0600)
committerEric Blake <ebb9@byu.net>
Tue, 27 Oct 2009 03:41:21 +0000 (21:41 -0600)
* lib/at-func.c (AT_FUNC_NAME): Avoid signed comparison between
pointer and zero.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/at-func.c

index e2f8551..0897109 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-10-26  Eric Blake  <ebb9@byu.net>
+
+       areadlinkat: fix fallback path
+       * lib/at-func.c (AT_FUNC_NAME): Avoid signed comparison between
+       pointer and zero.
+
 2009-10-22  Pádraig Brady  <P@draigBrady.com>
 
        Use a better IO block size for modern systems
index cc7bfc2..73be401 100644 (file)
@@ -115,7 +115,7 @@ AT_FUNC_NAME (int fd, char const *file AT_FUNC_POST_FILE_PARAM_DECLS)
     }
 
   err = CALL_FUNC (file);
-  saved_errno = (err < 0 ? errno : 0);
+  saved_errno = (err == FUNC_FAIL ? errno : 0);
 
   if (restore_cwd (&saved_cwd) != 0)
     openat_restore_fail (errno);