X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstrptime.c;h=a8791cf5a9515cc07ba70e8b6912057185915736;hb=1e60b920564d9b30c65c53553a4293b1c76863d8;hp=9373b45d7e2b8e51dd955bc366def2daec924533;hpb=88c14dcf4d4df04f3c12f7d506484993850c55ad;p=gnulib.git diff --git a/lib/strptime.c b/lib/strptime.c index 9373b45d7..a8791cf5a 100644 --- a/lib/strptime.c +++ b/lib/strptime.c @@ -17,9 +17,10 @@ #ifndef _LIBC # include -# include "strptime.h" #endif +#include + #include #include #ifdef _LIBC @@ -27,7 +28,6 @@ #endif #include #include -#include #include #ifdef _LIBC @@ -35,7 +35,6 @@ #endif #ifndef _LIBC -# include "time_r.h" enum ptime_locale_status { not, loc, raw }; #endif @@ -669,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';