NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/58041 CVS commit: src/lib/libc/time
The following reply was made to PR lib/58041; it has been noted by GNATS.
From: "Taylor R Campbell" <riastradh%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc:
Subject: PR/58041 CVS commit: src/lib/libc/time
Date: Mon, 18 Mar 2024 16:15:24 +0000
Module Name: src
Committed By: riastradh
Date: Mon Mar 18 16:15:24 UTC 2024
Modified Files:
src/lib/libc/time: strptime.c
Log Message:
strptime(3): Declare digit d as time_t.
This doesn't make a semantic difference -- d can only take on the ten
values {0,1,2,3,4,5,6,7,8,9}, and the arithmetic with it later all
comes out the same whether the type is unsigned or time_t, even if
time_t were int32_t instead of int64_t.
But it pacifies overzealous compilers used by downstream users of
this code. And while it's silly to use a much wider type (64-bit
signed) than is needed here to store a single digit, it doesn't
really hurt either (32-bit unsigned is much larger than needed too).
PR lib/58041
To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/lib/libc/time/strptime.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index