summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-03-18 08:41:06 +0000
committerache <ache@FreeBSD.org>2001-03-18 08:41:06 +0000
commitd600e3e3accd70a0ec5c17250510c4ffc16b5556 (patch)
tree173238306afb2ddb0329920d3004eae86621fa62 /lib
parent76d38cc222e708dd4ac714db32bb27737cea3eab (diff)
downloadFreeBSD-src-d600e3e3accd70a0ec5c17250510c4ffc16b5556.zip
FreeBSD-src-d600e3e3accd70a0ec5c17250510c4ffc16b5556.tar.gz
Make 'A' and 'a', 'B' and 'b' the same, per POSIX
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdtime/strptime.c42
1 files changed, 16 insertions, 26 deletions
diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c
index 57c5da1..58ae517 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))
OpenPOWER on IntegriCloud