diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 2001-03-18 08:41:06 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 2001-03-18 08:41:06 +0000 |
| commit | f7c5bca2eff08e111e70b848a20f170a516c13fc (patch) | |
| tree | ed1f0da6ed2514d1ab30f3adc8887475bac9fc72 /lib/libc | |
| parent | 0623d11f51ebe067afe66ca81d61a98aef18015e (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/stdtime/strptime.c | 42 |
1 files changed, 16 insertions, 26 deletions
diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c index 57c5da1e90ca..58ae5170d332 100644 --- a/lib/libc/stdtime/strptime.c +++ b/lib/libc/stdtime/strptime.c @@ -314,19 +314,14 @@ label: case 'A': case 'a': for (i = 0; i < asizeof(tptr->weekday); i++) { - if (c == 'A') { - len = strlen(tptr->weekday[i]); - if (strncasecmp(buf, - tptr->weekday[i], - len) == 0) - break; - } else { - len = strlen(tptr->wday[i]); - if (strncasecmp(buf, - tptr->wday[i], - len) == 0) - break; - } + len = strlen(tptr->weekday[i]); + if (strncasecmp(buf, tptr->weekday[i], + len) == 0) + break; + len = strlen(tptr->wday[i]); + if (strncasecmp(buf, tptr->wday[i], + len) == 0) + break; } if (i == asizeof(tptr->weekday)) return 0; @@ -417,19 +412,14 @@ label: break; } } else { - if (c == 'B') { - len = strlen(tptr->month[i]); - if (strncasecmp(buf, - tptr->month[i], - len) == 0) - break; - } else { - len = strlen(tptr->mon[i]); - if (strncasecmp(buf, - tptr->mon[i], - len) == 0) - break; - } + len = strlen(tptr->month[i]); + if (strncasecmp(buf, tptr->month[i], + len) == 0) + break; + len = strlen(tptr->mon[i]); + if (strncasecmp(buf, tptr->mon[i], + len) == 0) + break; } } if (i == asizeof(tptr->month)) |
