aboutsummaryrefslogtreecommitdiff
path: root/stdio-common/printf_fphex.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/printf_fphex.c')
-rw-r--r--stdio-common/printf_fphex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stdio-common/printf_fphex.c b/stdio-common/printf_fphex.c
index c57396f98b..eaae77a8d5 100644
--- a/stdio-common/printf_fphex.c
+++ b/stdio-common/printf_fphex.c
@@ -166,7 +166,7 @@ __printf_fphex (FILE *fp,
if (__isinfl (fpnum.ldbl.d))
special = isupper (info->spec) ? "INF" : "inf";
- negative = fpnum.ldbl.d < 0;
+ negative = signbit (fpnum.ldbl.d);
}
}
else
@@ -184,7 +184,7 @@ __printf_fphex (FILE *fp,
if (__isinf (fpnum.dbl.d))
special = isupper (info->spec) ? "INF" : "inf";
- negative = fpnum.dbl.d < 0;
+ negative = signbit (fpnum.dbl.d);
}
}