bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_HEADER_STDC


From: Ralf Wildenhues
Subject: Re: AC_HEADER_STDC
Date: Thu, 6 Jul 2006 09:48:55 +0200
User-agent: Mutt/1.5.11-2006-07-05

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).

>      /* Do nothing. */ ;
>  
>    for (;;)
>      {
>        if (*size <= name_index)
>       *name = x2nrealloc (*name, size, sizeof **name);
> -      if (c == EOF || ISSPACE (c))
> +      if (c == EOF || isspace (c))

Likewise.

>       break;
>        (*name)[name_index++] = c;
>        c = getc (stream);


> Index: lib/strtod.c
> ===================================================================
> RCS file: /cvsroot/gnulib/gnulib/lib/strtod.c,v
> retrieving revision 1.19
> diff -p -u -r1.19 strtod.c
> --- lib/strtod.c      17 Jun 2006 19:29:36 -0000      1.19
> +++ 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.

>      {
>        /* Get the exponent specified after the `e' or `E'.  */
>        int save = errno;

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]