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 3f38799..36334f4 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 583c1a4..20ca40b 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))
     {