]> Savannah Git Hosting - gnulib.git/commitdiff
canonicalize: fix C89 compilation
authorPádraig Brady <P@draigBrady.com>
Mon, 15 Oct 2012 05:38:19 +0000 (22:38 -0700)
committerPádraig Brady <P@draigBrady.com>
Mon, 15 Oct 2012 05:43:38 +0000 (22:43 -0700)
* lib/canonicalize.c (canonicalize_filename_mode): Swap order of
declarations so C89 is supported.  Also remove the comment
referencing mem allocation as the suggested feature could
not be implemented as suggested.
Reported by Michael Goffioul

ChangeLog
lib/canonicalize.c

index 3f38799b16e0d91157876b3dbf39d5def17e16ae..36334f4b07492bbed1cf1aadd0eca5ab4aeda03b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-10-14  Pádraig Brady  <P@draigBrady.com>
+       canonicalize: fix C89 compilation
+       * lib/canonicalize.c (canonicalize_filename_mode): Swap order of
+       declarations so C89 is supported.  Also remove the comment
+       referencing memorty allocation as the suggested feature could
+       not be implemented as suggested.
+       Reported by Michael Goffioul.
+
 2012-10-12  Paul Eggert  <eggert@cs.ucla.edu>
 
        group-member: omit unnecessary dependencies
index 583c1a4af200903b7f6b935191b43cddc28bc889..20ca40bf85dd0ace55e965f930aed0e0dc417c10 100644 (file)
@@ -99,9 +99,9 @@ canonicalize_filename_mode (const char *name, canonicalize_mode_t can_mode)
   Hash_table *ht = NULL;
   int saved_errno;
   int can_flags = can_mode & ~CAN_MODE_MASK;
-  can_mode &= CAN_MODE_MASK;
   bool logical = can_flags & CAN_NOLINKS;
-  /* Perhaps in future we might support CAN_NOALLOC with CAN_NOLINKS.  */
+
+  can_mode &= CAN_MODE_MASK;
 
   if (MULTIPLE_BITS_SET (can_mode))
     {