1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-04-28 06:33:36 +00:00

regex: Silence -Wzero-as-null-pointer-constant warning.

* lib/regexec.c (merge_state_with_log): Check the pointer against NULL.
This commit is contained in:
Collin Funk
2026-04-16 21:50:27 -07:00
parent acff3d2250
commit b6e096af38
2 changed files with 6 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
2026-04-16 Collin Funk <collin.funk1@gmail.com>
regex: Silence -Wzero-as-null-pointer-constant warning.
* lib/regexec.c (merge_state_with_log): Check the pointer against NULL.
2026-04-16 Bruno Haible <bruno@clisp.org>
byteswap: Fix compilation on Solaris OpenIndiana (regr. 2026-03-20).

View File

@@ -2341,7 +2341,7 @@ merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx,
mctx->state_log[cur_idx] = next_state;
mctx->state_log_top = cur_idx;
}
else if (mctx->state_log[cur_idx] == 0)
else if (mctx->state_log[cur_idx] == NULL)
{
mctx->state_log[cur_idx] = next_state;
}