summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/stdtime/strptime.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c
index e942e04..2be6358 100644
--- a/lib/libc/stdtime/strptime.c
+++ b/lib/libc/stdtime/strptime.c
@@ -103,9 +103,6 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
ptr = fmt;
while (*ptr != 0) {
- if (*buf == 0)
- break;
-
c = *ptr++;
if (c != '%') {
@@ -123,7 +120,6 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
label:
c = *ptr++;
switch (c) {
- case 0:
case '%':
if (*buf++ != '%')
return (NULL);
@@ -600,6 +596,9 @@ label:
while (isspace_l((unsigned char)*buf, locale))
buf++;
break;
+
+ default:
+ return (NULL);
}
}
OpenPOWER on IntegriCloud