summaryrefslogtreecommitdiff
path: root/libc/misc/time
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2002-08-12 04:32:41 +0000
committerManuel Novoa III <mjn3@codepoet.org>2002-08-12 04:32:41 +0000
commit666e8f922ffe516cb4803887a91ddd75f308a79d (patch)
treec1d5e82d40b2ca178d179d5f1887ef1f88142a53 /libc/misc/time
parent9a34fd5b8807487a89bb9dd4e895f1f448d75e94 (diff)
Revert commit by davidm to printf.c that initialized conv_num
needlessly. To do so increases the generated code size with bcc. Eliminate duplicate define warnings in wstring.c. Fix potentially broken preprocessor comparisons. The preprocessor converts integers to maximal signed type, so inequality comparisons involving UINTMAX_MAX, ULLONG_MAX, and (if no long long) ULONG_MAX were potentially broken.
Diffstat (limited to 'libc/misc/time')
-rw-r--r--libc/misc/time/time.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
index d439de90c..3f0ddf78d 100644
--- a/libc/misc/time/time.c
+++ b/libc/misc/time/time.c
@@ -449,7 +449,8 @@ static int tm_isdst(register const struct tm *__restrict ptm)
{
register rule_struct *r = _time_tzinfo;
long sec;
- int i, isdst, isleap, day, day0, monlen, mday, oday;
+ int i, isdst, isleap, day, day0, monlen, mday;
+ int oday; /* Note: oday can be uninitialized. */
isdst = 0;
if (r[1].tzname[0] != 0) {
@@ -1681,7 +1682,7 @@ struct tm *_time_t2tm(const time_t *__restrict timer,
{
register int *p;
time_t t1, t, v;
- int wday;
+ int wday; /* Note: wday can be uninitialized. */
{
register const uint16_t *vp;