diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-04-16 17:25:42 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-04-16 17:25:42 +0300 |
commit | f13dbca68d16b6598066a8d4bf401fd3e1f58bff (patch) | |
tree | e2ef16570773ae61382de30fc5e1e9eb533682e9 | |
parent | 5d781d9d27f2ab30679853317df3f5e9ad94be80 (diff) | |
download | egawk-f13dbca68d16b6598066a8d4bf401fd3e1f58bff.tar.gz egawk-f13dbca68d16b6598066a8d4bf401fd3e1f58bff.tar.bz2 egawk-f13dbca68d16b6598066a8d4bf401fd3e1f58bff.zip |
Fix printf format in regex malloc wrappers.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | regex_internal.h | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -3,6 +3,12 @@ * builtin.c (do_strftime): Use a double for the timestamp and check that the value is within range for a time_t. + Unrelated: + + * regex_internal.h (test_malloc, test_realloc): Use %lu in printf + format for error messages. Thanks to Michal Jaegermann for + pointing this out. + 2015-04-14 Arnold D. Robbins <arnold@skeeve.com> * builtin.c (do_strftime): Restore checking for negative result and diff --git a/regex_internal.h b/regex_internal.h index 6a870f23..327bd7e0 100644 --- a/regex_internal.h +++ b/regex_internal.h @@ -479,7 +479,7 @@ static void * test_malloc(size_t count, const char *file, size_t line) { if (count == 0) { - fprintf(stderr, "%s:%d: allocation of zero bytes\n", + fprintf(stderr, "%s:%lu: allocation of zero bytes\n", file, line); exit(1); } @@ -490,7 +490,7 @@ static void * test_realloc(void *p, size_t count, const char *file, size_t line) { if (count == 0) { - fprintf(stderr, "%s:%d: reallocation of zero bytes\n", + fprintf(stderr, "%s:%lu: reallocation of zero bytes\n", file, line); exit(1); } |