From 6e768ec1015d2315c750a21e1a6f6d1199732105 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Wed, 20 Oct 2010 07:23:14 +0200 Subject: replace sizeof(foo)/sizeof(foo[0]) with SAL_N_ELEMENTS(foo) --- regexp/orig/regex.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'regexp') diff --git a/regexp/orig/regex.c b/regexp/orig/regex.c index b429eabbcf13..bbbb5f245622 100644 --- a/regexp/orig/regex.c +++ b/regexp/orig/regex.c @@ -5817,8 +5817,7 @@ regerror (errcode, preg, errbuf, errbuf_size) size_t msg_size; if (errcode < 0 - || errcode >= (int) (sizeof (re_error_msgid_idx) - / sizeof (re_error_msgid_idx[0]))) + || errcode >= (int)SAL_N_ELEMENTS(re_error_msgid_idx)) /* Only error codes returned by the rest of the code should be passed to this routine. If we are given anything else, or if other regex code generates an invalid error code, then the program has a bug. -- cgit v1.2.1