libroot: Fix possible typo in printf_size.c

It appears as if there is a typo in printf_size.c; it makes
no sense to compare an unitialized variable in such a way.
Since `info->width` is referenced later on in the variable
assignment, it seems possible that the intended statement
was to place the larger of the values between `info->width`
and `info->prec` into `width`.

Fixes CID 609431.

korli: Patch applied in cddfcf2f87
was incomplete. This patch completes with what upstream did in 2004:
https://github.com/bminor/glibc/commit/fa5753eede3e97e94f50928989b313fb1fbdae6f.patch

Signed-off-by: Jérôme Duval <[email protected]>
This commit is contained in:
ohnx
2018-01-03 19:42:55 +01:00
committed by Jérôme Duval
parent 36ef138ce5
commit 7766c048b3
@@ -183,7 +183,7 @@ printf_size (FILE *fp, const struct printf_info *info, const void *const *args)
if (special)
{
int width = info->prec > width ? info->prec : info->width;
int width = info->prec > info->width ? info->prec : info->width;
if (negative || info->showsign || info->space)
--width;