2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 05:48:18 +00:00

Don't need to check for *cp being non-zero, isdigit() will do that.

This commit is contained in:
Todd C. Miller 2010-07-27 10:12:24 -04:00
parent 18d25e96f0
commit c33bf93509

View File

@ -890,7 +890,7 @@ parse_timing(buf, decimal, idx, seconds, nbytes)
*seconds = (double)l;
cp = ep + (*ep == '.' ? 1 : strlen(decimal));
d = 10.0;
while (*cp && isdigit((unsigned char) *cp)) {
while (isdigit((unsigned char) *cp)) {
fract += (*cp - '0') / d;
d *= 10;
cp++;