summaryrefslogtreecommitdiff
path: root/regexp
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2010-10-20 07:23:14 +0200
committerDavid Tardon <dtardon@redhat.com>2010-10-20 07:23:14 +0200
commit6e768ec1015d2315c750a21e1a6f6d1199732105 (patch)
tree58c93dfe8872eb98ef2182ac967d3426e8aa6cf9 /regexp
parent15fd41aba70f39ce9e1351323ff9e948679efe51 (diff)
replace sizeof(foo)/sizeof(foo[0]) with SAL_N_ELEMENTS(foo)
Diffstat (limited to 'regexp')
-rw-r--r--regexp/orig/regex.c3
1 files changed, 1 insertions, 2 deletions
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.