diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2015-01-15 11:50:16 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2015-01-15 11:50:16 +0000 |
commit | ee0405c689cc8ca44522ed5dd3750cdc0c6e4ce4 (patch) | |
tree | dce7d671c0b681460d5428d0126b90792ea1214d | |
parent | Add overflow detection (diff) | |
download | w3m-ee0405c689cc8ca44522ed5dd3750cdc0c6e4ce4.tar.gz w3m-ee0405c689cc8ca44522ed5dd3750cdc0c6e4ce4.zip |
Drop C99 features
Diffstat (limited to '')
-rw-r--r-- | alloc.h | 4 | ||||
-rw-r--r-- | main.c | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -13,9 +13,9 @@ static inline size_t z_mult_no_oflow_(size_t n, size_t size) { - if (size != 0 && n > SIZE_MAX / size) { + if (size != 0 && n > ULONG_MAX / size) { fprintf(stderr, - "w3m: overflow in malloc, %zu*%zu\n", n, size); + "w3m: overflow in malloc, %lu*%lu\n", (unsigned long)n, (unsigned long)size); exit(1); } return n * size; @@ -386,7 +386,7 @@ make_optional_header_string(char *s) static void * die_oom(size_t bytes) { - fprintf(stderr, "Out of memory: %zu bytes unavailable!\n", bytes); + fprintf(stderr, "Out of memory: %lu bytes unavailable!\n", (unsigned long)bytes); exit(1); } |