bug-gnulib
[Top][All Lists]
Advanced

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

Re: c-strtod: improve error checking


From: Bruno Haible
Subject: Re: c-strtod: improve error checking
Date: Wed, 21 Jan 2009 23:39:19 +0100
User-agent: KMail/1.9.9

Hi Jim,

> I prefer to avoid casts, so please use this test instead:
> 
>      if (!c_locale)

If you prefer this way. I committed it like you say.

> > +  c_locale = newlocale (LC_ALL_MASK, "C", (locale_t)0);
> 
> I suppose NULL isn't necessarily defined

POSIX explicitly mentions (locale_t)0. I suppose it's because it's not
specified whether locale_t is an integral type or a pointer type. For this
reason, writing NULL could lead to gcc warnings (if locale_t is an integral
type).

Bruno




reply via email to

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