about summary refs log tree commit diff
path: root/stdio-common/printf_fphex.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-11-02 12:14:51 +0100
committerFlorian Weimer <fweimer@redhat.com>2017-11-02 12:45:20 +0100
commitd10b132bf5393e648a1c64569746c8e886d50702 (patch)
tree66a444574feee728a133c754c9527c02fe25e249 /stdio-common/printf_fphex.c
parentc94a5688fb1228a862b2d4a3f1239cdc0e3349e5 (diff)
downloadglibc-d10b132bf5393e648a1c64569746c8e886d50702.tar.gz
glibc-d10b132bf5393e648a1c64569746c8e886d50702.tar.xz
glibc-d10b132bf5393e648a1c64569746c8e886d50702.zip
stdio-common: Use array_length and array_end macros
Diffstat (limited to 'stdio-common/printf_fphex.c')
-rw-r--r--stdio-common/printf_fphex.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/stdio-common/printf_fphex.c b/stdio-common/printf_fphex.c
index 004d2aa716..938b0b32e0 100644
--- a/stdio-common/printf_fphex.c
+++ b/stdio-common/printf_fphex.c
@@ -17,6 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <array_length.h>
 #include <ctype.h>
 #include <ieee754.h>
 #include <math.h>
@@ -320,8 +321,8 @@ __printf_fphex (FILE *fp,
   /* Look for trailing zeroes.  */
   if (! zero_mantissa)
     {
-      wnumend = &wnumbuf[sizeof wnumbuf / sizeof wnumbuf[0]];
-      numend = &numbuf[sizeof numbuf / sizeof numbuf[0]];
+      wnumend = array_end (wnumbuf);
+      numend = array_end (numbuf);
       while (wnumend[-1] == L'0')
 	{
 	  --wnumend;