aboutsummaryrefslogtreecommitdiff
path: root/stdio-common/vfprintf.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/vfprintf.c
parentc94a5688fb1228a862b2d4a3f1239cdc0e3349e5 (diff)
downloadglibc-d10b132bf5393e648a1c64569746c8e886d50702.zip
glibc-d10b132bf5393e648a1c64569746c8e886d50702.tar.gz
glibc-d10b132bf5393e648a1c64569746c8e886d50702.tar.bz2
stdio-common: Use array_length and array_end macros
Diffstat (limited to 'stdio-common/vfprintf.c')
-rw-r--r--stdio-common/vfprintf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index 23d2679..e272237 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -15,6 +15,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <array_length.h>
#include <ctype.h>
#include <limits.h>
#include <printf.h>
@@ -995,11 +996,10 @@ static const uint8_t jump_table[] =
if (string == NULL) \
{ \
/* Write "(null)" if there's space. */ \
- if (prec == -1 \
- || prec >= (int) (sizeof (null) / sizeof (null[0])) - 1) \
+ if (prec == -1 || prec >= (int) array_length (null) - 1) \
{ \
string = (CHAR_T *) null; \
- len = (sizeof (null) / sizeof (null[0])) - 1; \
+ len = array_length (null) - 1; \
} \
else \
{ \