diff options
author | Yang Tse <yangsita@gmail.com> | 2008-08-23 02:35:16 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-08-23 02:35:16 +0000 |
commit | 70b1cd798f4e64ab18f117114599089e383f75c1 (patch) | |
tree | ac9e8f191d52e87bf4ba1d56ecae2916b4583bab /lib/mprintf.c | |
parent | 578f42d588a5698f6488a11dd880acb592ca524c (diff) | |
download | curl-70b1cd798f4e64ab18f117114599089e383f75c1.tar.gz |
explicit value assignment for comparison result
Diffstat (limited to 'lib/mprintf.c')
-rw-r--r-- | lib/mprintf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mprintf.c b/lib/mprintf.c index 3f74f26f5..be6832fa1 100644 --- a/lib/mprintf.c +++ b/lib/mprintf.c @@ -726,7 +726,7 @@ static int dprintf_formatf( else prec = -1; - is_alt = p->flags & FLAGS_ALT; + is_alt = (p->flags & FLAGS_ALT) ? 1 : 0; switch (p->type) { case FORMAT_INT: @@ -763,7 +763,7 @@ static int dprintf_formatf( /* Decimal integer. */ base = 10; - is_neg = (p->data.num.as_signed < (mp_intmax_t)0); + is_neg = (p->data.num.as_signed < (mp_intmax_t)0) ? 1 : 0; if(is_neg) { /* signed_num might fail to hold absolute negative minimum by 1 */ signed_num = p->data.num.as_signed + (mp_intmax_t)1; |