mirror of git://sourceware.org/git/glibc.git
(__vstrfmon_l): Memset whole info structure instead of trying to initialize some, but not all, fields one by one.
This commit is contained in:
parent
b3e46788ef
commit
01f7e92814
|
|
@ -543,20 +543,14 @@ __vstrfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format,
|
||||||
the numeric representation is too long. */
|
the numeric representation is too long. */
|
||||||
s[maxsize - 1] = '\0';
|
s[maxsize - 1] = '\0';
|
||||||
|
|
||||||
|
memset (&info, '\0', sizeof (info));
|
||||||
info.prec = right_prec;
|
info.prec = right_prec;
|
||||||
info.width = left_prec + (right_prec ? (right_prec + 1) : 0);
|
info.width = left_prec + (right_prec ? (right_prec + 1) : 0);
|
||||||
info.spec = 'f';
|
info.spec = 'f';
|
||||||
info.is_long_double = is_long_double;
|
info.is_long_double = is_long_double;
|
||||||
info.is_short = 0;
|
|
||||||
info.is_long = 0;
|
|
||||||
info.alt = 0;
|
|
||||||
info.space = 0;
|
|
||||||
info.left = 0;
|
|
||||||
info.showsign = 0;
|
|
||||||
info.group = group;
|
info.group = group;
|
||||||
info.pad = pad;
|
info.pad = pad;
|
||||||
info.extra = 1; /* This means use values from LC_MONETARY. */
|
info.extra = 1; /* This means use values from LC_MONETARY. */
|
||||||
info.wide = 0;
|
|
||||||
|
|
||||||
ptr = &fpnum;
|
ptr = &fpnum;
|
||||||
done = __printf_fp ((FILE *) &f, &info, &ptr);
|
done = __printf_fp ((FILE *) &f, &info, &ptr);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue