summaryrefslogtreecommitdiff
path: root/regexp
diff options
context:
space:
mode:
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.