changeset 36822:0632d7148bd7

canonicalize: fix C89 compilation * 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
author Pádraig Brady <P@draigBrady.com>
date Sun, 14 Oct 2012 22:38:19 -0700
parents 2b2ecd5b5a56
children e96f001245ec
files ChangeLog lib/canonicalize.c
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Oct 13 15:14:05 2012 -0700
+++ b/ChangeLog	Sun Oct 14 22:38:19 2012 -0700
@@ -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
--- a/lib/canonicalize.c	Sat Oct 13 15:14:05 2012 -0700
+++ b/lib/canonicalize.c	Sun Oct 14 22:38:19 2012 -0700
@@ -99,9 +99,9 @@
   Hash_table *ht = NULL;
   int saved_errno;
   int can_flags = can_mode & ~CAN_MODE_MASK;
+  bool logical = can_flags & CAN_NOLINKS;
+
   can_mode &= CAN_MODE_MASK;
-  bool logical = can_flags & CAN_NOLINKS;
-  /* Perhaps in future we might support CAN_NOALLOC with CAN_NOLINKS.  */
 
   if (MULTIPLE_BITS_SET (can_mode))
     {