Skip to content

Commit a177253

Browse files
committed
regex: make size_t prints portable
1 parent 9f78fd0 commit a177253

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/regex/regex_mod.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ static int load_pcres(int action)
437437
pcre_tmp = pcre2_compile((PCRE2_SPTR)patterns[i], PCRE2_ZERO_TERMINATED, pcre_options, &pcre_error, &pcre_erroffset, NULL);
438438
if (pcre_tmp == NULL) {
439439
pcre2_get_error_message(pcre_error, pcre_error_str, sizeof(pcre_error_str));
440-
LM_ERR("pcre_tmp compilation of '%s' failed at offset %ld: %s\n", patterns[i], pcre_erroffset, pcre_error_str);
440+
LM_ERR("pcre_tmp compilation of '%s' failed at offset %zu: %s\n", patterns[i], pcre_erroffset, pcre_error_str);
441441
goto err;
442442
}
443443
pcre_rc = pcre2_pattern_info(pcre_tmp, PCRE2_INFO_SIZE, &pcre_size);
@@ -573,7 +573,7 @@ static int w_pcre_match(struct sip_msg* _msg, str* string, str* _regex_s)
573573
pcre_re = pcre2_compile((PCRE2_SPTR)regex.s, PCRE2_ZERO_TERMINATED, pcre_options, &pcre_error, &pcre_erroffset, NULL);
574574
if (pcre_re == NULL) {
575575
pcre2_get_error_message(pcre_error, pcre_error_str, sizeof(pcre_error_str));
576-
LM_ERR("pcre_re compilation of '%s' failed at offset %ld: %s\n", regex.s, pcre_erroffset, pcre_error_str);
576+
LM_ERR("pcre_re compilation of '%s' failed at offset %zu: %s\n", regex.s, pcre_erroffset, pcre_error_str);
577577
pkg_free(regex.s);
578578
return -4;
579579
}

0 commit comments

Comments
 (0)