* libc/strfmon.c (__setup_vars): Test for an empty string rather than

for a NULL pointer.
This commit is contained in:
Corinna Vinschen 2010-01-29 19:38:22 +00:00
parent d5c4cd3f6c
commit 0b189c1ef3
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2010-01-29 Corinna Vinschen <corinna@vinschen.de>
* libc/strfmon.c (__setup_vars): Test for an empty string rather than
for a NULL pointer.
2010-01-29 Christopher Faylor <me+cygwin@cgf.cx>
* dll_init.cc (remove_dll_atexit): New function.

View File

@ -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;