[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_HEADER_STDC
From: |
Eric Blake |
Subject: |
Re: AC_HEADER_STDC |
Date: |
Thu, 06 Jul 2006 06:25:38 -0600 |
User-agent: |
Thunderbird 1.5.0.4 (Windows/20060516) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Ralf Wildenhues on 7/6/2006 1:48 AM:
> Hello Paul,
>
> Some nits below.
>
> * Paul Eggert wrote on Thu, Jul 06, 2006 at 01:44:03AM CEST:
>> Index: lib/getusershell.c
>> ===================================================================
>> RCS file: /cvsroot/gnulib/gnulib/lib/getusershell.c,v
>> retrieving revision 1.22
>> diff -p -u -r1.22 getusershell.c
>> --- lib/getusershell.c 23 Sep 2005 04:15:13 -0000 1.22
>> +++ lib/getusershell.c 5 Jul 2006 23:33:38 -0000
>
>> @@ -152,14 +144,14 @@ readname (char **name, size_t *size, FIL
>> size_t name_index = 0;
>>
>> /* Skip blank space. */
>> - while ((c = getc (stream)) != EOF && ISSPACE (c))
>> + while ((c = getc (stream)) != EOF && isspace (c))
>
> missing cast to unsigned char (c is int).
getc is guaranteed to return an int that is in the range acceptable by
isspace. No cast needed here, if I understand correctly.
>> +++ lib/strtod.c 5 Jul 2006 23:33:38 -0000
>
>> @@ -111,7 +101,7 @@ strtod (const char *nptr, char **endptr)
>> if (!got_digit)
>> goto noconv;
>>
>> - if (TOLOWER (*s) == 'e')
>> + if (tolower (*s) == 'e')
>
> s is of type 'const char *'. So this needs a cast to unsigned char as
> well, IIRC.
You are right, here. tolower of plain char is undefined if char is signed.
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFErQFC84KuGfSFAYARAgLWAJ0eBTfoWlnbZdL62IFrXMF5xvAxHgCdH6Zk
Y2WeLhFx4dtpi7VnD0pfEMc=
=y0Ei
-----END PGP SIGNATURE-----