This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: just made a change I didn't like to strfmon.c
On Jan 29 13:36, Christopher Faylor wrote:
> On Fri, Jan 29, 2010 at 07:09:06PM +0100, Corinna Vinschen wrote:
> >On Jan 29 19:03, Corinna Vinschen wrote:
> >> On Jan 29 12:40, Christopher Faylor wrote:
> >> > @@ -429,7 +430,7 @@ __setup_vars(int flags, char *cs_precede
> >> > *cs_precedes = lc->n_cs_precedes;
> >> > *sep_by_space = lc->n_sep_by_space;
> >> > *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->n_sign_posn;
> >> > - *signstr = (lc->negative_sign == '\0') ? "-"
> >> > + *signstr = (lc->negative_sign == NULL) ? negative
> >
> >I think the fix is wrong, btw. The string members of the struct
> >returned by localeconv are supposed to be never NULL. This is a test
> >for an empty string which is suffering from a typo, the missing '*'.
> >
> >Are you going to fix it or shall I?
>
> I'm not going to fix something that I don't understand. If you're sure
> that this is not supposed to be NULL then go ahead and make the change.
An equivalent expression is used in glibc, testing for '\0'. So, yes,
I am sure. I'll apply a fix.
However, regardless of this tiny detail, thanks for catching the
problem.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat