summaryrefslogtreecommitdiff
path: root/src/pcresearch.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-10-11 09:03:59 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2022-10-11 09:05:15 -0700
commit429b3497d18814557195b83008700d0893a3b342 (patch)
tree4820e2b668f5edceb000c64833b49c4516b2b894 /src/pcresearch.c
parent1dd9bbe724624220a6ea136a1199d5172e5c1312 (diff)
downloadgrep-429b3497d18814557195b83008700d0893a3b342.tar.gz
maint: prefer stdckdint.h to intprops.h
Prefer the standard C23 ckd_* macros to Gnulib’s *_WRAPV macros. * bootstrap.conf (gnulib_modules): Add stdckdint. * src/grep.c, src/kwset.c, src/pcresearch.c: Include stdckdint.h, and prefer ckd_* to *_WRAPV. Include intprops.h only if needed.
Diffstat (limited to 'src/pcresearch.c')
-rw-r--r--src/pcresearch.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pcresearch.c b/src/pcresearch.c
index fd8ea0cc..6ccfac07 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -20,7 +20,8 @@
#include "search.h"
#include "die.h"
-#include "intprops.h"
+
+#include <stdckdint.h>
#define PCRE2_CODE_UNIT_WIDTH 8
#include <pcre2.h>
@@ -106,7 +107,7 @@ jit_exec (struct pcre_comp *pc, char const *subject, idx_t search_bytes,
{
uint32_t lim;
pcre2_config (PCRE2_CONFIG_DEPTHLIMIT, &lim);
- if (INT_MULTIPLY_WRAPV (lim, 2, &lim))
+ if (ckd_mul (&lim, lim, 2))
return e;
if (!pc->mcontext)
pc->mcontext = pcre2_match_context_create (pc->gcontext);