summaryrefslogtreecommitdiff
path: root/lib/strptime.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2007-03-24 00:10:32 +0000
committerBruno Haible <bruno@clisp.org>2007-03-24 00:10:32 +0000
commit02e1e1628e6761ecdddad4669e57d17c395f0944 (patch)
tree74aa48eec54c26532f0a701a6b152c8df4b1cf22 /lib/strptime.c
parent6bfbb0d1d8f2818625bbf0cd3c4010f9c6d53ebd (diff)
downloadgnulib-02e1e1628e6761ecdddad4669e57d17c395f0944.tar.gz
Stick to ANSI C syntax, not C99 syntax.
Diffstat (limited to 'lib/strptime.c')
-rw-r--r--lib/strptime.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/strptime.c b/lib/strptime.c
index c5a039da95..a8791cf5a9 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';