projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
math: remove *_WORD64 macros from libm.h
[musl]
/
src
/
time
/
strptime.c
diff --git
a/src/time/strptime.c
b/src/time/strptime.c
index
488c08d
..
0f66e6c
100644
(file)
--- a/
src/time/strptime.c
+++ b/
src/time/strptime.c
@@
-7,7
+7,7
@@
#include <string.h>
#include <strings.h>
#include <string.h>
#include <strings.h>
-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;
{
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++;
else if (*s != *f) return 0;
else s++;
f++;
+ continue;
}
f++;
if (*f == '+') f++;
}
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;
ex = nl_langinfo(min+i);
len = strlen(ex);
if (strncasecmp(s, ex, len)) continue;
+ s += len;
*dest = i % range;
break;
}
*dest = i % range;
break;
}