From 02e1e1628e6761ecdddad4669e57d17c395f0944 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 24 Mar 2007 00:10:32 +0000 Subject: [PATCH] Stick to ANSI C syntax, not C99 syntax. --- ChangeLog | 4 ++++ lib/strptime.c | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b608a7cf1..74a480030 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-03-22 Bruno Haible + + * lib/strptime.c (__strptime_internal): Use ANSI C syntax. + 2007-03-23 Paul Eggert * MODULES.html.sh (File system functions): New module write-any-file. diff --git a/lib/strptime.c b/lib/strptime.c index c5a039da9..a8791cf5a 100644 --- a/lib/strptime.c +++ b/lib/strptime.c @@ -668,13 +668,16 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM) specify hours. If fours digits are used, minutes are also specified. */ { + bool neg; + int n; + val = 0; while (*rp == ' ') ++rp; if (*rp != '+' && *rp != '-') return NULL; - bool neg = *rp++ == '-'; - int n = 0; + neg = *rp++ == '-'; + n = 0; while (n < 4 && *rp >= '0' && *rp <= '9') { val = val * 10 + *rp++ - '0'; -- 2.11.0