From 573dad2ce496fa87dac2e79f37bae62e0be1d2c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?= Date: Sun, 14 Oct 2012 22:38:19 -0700 Subject: [PATCH] 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 --- ChangeLog | 8 ++++++++ lib/canonicalize.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) 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)) { -- 2.39.5