changeset 12199:3fd611a409d1

areadlinkat: fix fallback path * lib/at-func.c (AT_FUNC_NAME): Avoid signed comparison between pointer and zero. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Mon, 26 Oct 2009 21:41:21 -0600
parents e8fbc5424b99
children da69155ee914
files ChangeLog lib/at-func.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Oct 22 17:36:28 2009 +0100
+++ b/ChangeLog	Mon Oct 26 21:41:21 2009 -0600
@@ -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
--- a/lib/at-func.c	Thu Oct 22 17:36:28 2009 +0100
+++ b/lib/at-func.c	Mon Oct 26 21:41:21 2009 -0600
@@ -115,7 +115,7 @@
     }
 
   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);