From: Pádraig Brady Date: Mon, 15 Oct 2012 05:38:19 +0000 (-0700) Subject: canonicalize: fix C89 compilation X-Git-Tag: v0.1~398 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=573dad2ce496fa87dac2e79f37bae62e0be1d2c6;p=gnulib.git 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 --- diff --git a/ChangeLog b/ChangeLog index 3f38799b16..36334f4b07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-10-14 Pádraig Brady + 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 group-member: omit unnecessary dependencies diff --git a/lib/canonicalize.c b/lib/canonicalize.c index 583c1a4af2..20ca40bf85 100644 --- a/lib/canonicalize.c +++ b/lib/canonicalize.c @@ -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)) {