diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 09ba9bff2..23489ca1f 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2010-01-29 Corinna Vinschen + + * libc/strfmon.c (__setup_vars): Test for an empty string rather than + for a NULL pointer. + 2010-01-29 Christopher Faylor * dll_init.cc (remove_dll_atexit): New function. diff --git a/winsup/cygwin/libc/strfmon.c b/winsup/cygwin/libc/strfmon.c index ac23aa05b..79f8ab461 100644 --- a/winsup/cygwin/libc/strfmon.c +++ b/winsup/cygwin/libc/strfmon.c @@ -419,7 +419,7 @@ __setup_vars(int flags, char *cs_precedes, char *sep_by_space, *cs_precedes = lc->int_n_cs_precedes; *sep_by_space = lc->int_n_sep_by_space; *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->int_n_sign_posn; - *signstr = (lc->negative_sign == NULL) ? negative + *signstr = (*lc->negative_sign == '\0') ? negative : lc->negative_sign; } else if (flags & USE_INTL_CURRENCY) { *cs_precedes = lc->int_p_cs_precedes; @@ -430,7 +430,7 @@ __setup_vars(int flags, char *cs_precedes, char *sep_by_space, *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 == NULL) ? negative + *signstr = (*lc->negative_sign == '\0') ? negative : lc->negative_sign; } else { *cs_precedes = lc->p_cs_precedes;