X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Ftime%2Fstrptime.c;h=0f66e6c65498fad6c682a315d3bf65a289eb998f;hb=ccc7b4c3a17ade90de71e1e0f44deebbffd646e6;hp=488c08dd657aaca737a14659ef045469162085e9;hpb=5989dde3459b2ccd304f89e3e875136e5608b8ff;p=musl diff --git a/src/time/strptime.c b/src/time/strptime.c index 488c08dd..0f66e6c6 100644 --- a/src/time/strptime.c +++ b/src/time/strptime.c @@ -7,7 +7,7 @@ #include #include -char *strptime(const char *s, const char *f, struct tm *tm) +char *strptime(const char *restrict s, const char *restrict f, struct tm *restrict tm) { int i, w, neg, adj, min, range, *dest; const char *ex; @@ -18,6 +18,7 @@ char *strptime(const char *s, const char *f, struct tm *tm) else if (*s != *f) return 0; else s++; f++; + continue; } f++; if (*f == '+') f++; @@ -165,6 +166,7 @@ char *strptime(const char *s, const char *f, struct tm *tm) ex = nl_langinfo(min+i); len = strlen(ex); if (strncasecmp(s, ex, len)) continue; + s += len; *dest = i % range; break; }