summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Moinvaziri <nathan@nathanm.com>2020-07-10 13:59:25 -0700
committerHans Kristian Rosbach <hk-github@circlestorm.org>2020-07-12 12:30:07 +0200
commitaac87a0762efb6d4c01c17a11701e4a8125541cc (patch)
treefd135b731706c944a2b56d62c7ee0d51cbb9933f
parent4680bccb98c2871fecb42fca4ff050b63036d21d (diff)
downloadProject-Tick-aac87a0762efb6d4c01c17a11701e4a8125541cc.tar.gz
Project-Tick-aac87a0762efb6d4c01c17a11701e4a8125541cc.zip
Removed legacy typedef caddr_t from gz_compress_mmap.
-rw-r--r--test/fuzz/minigzip_fuzzer.c6
-rw-r--r--test/minigzip.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/test/fuzz/minigzip_fuzzer.c b/test/fuzz/minigzip_fuzzer.c
index e2ac6f7b17..a4bd112d3d 100644
--- a/test/fuzz/minigzip_fuzzer.c
+++ b/test/fuzz/minigzip_fuzzer.c
@@ -121,7 +121,7 @@ int gz_compress_mmap(FILE *in, gzFile out) {
int len;
int err;
int ifd = fileno(in);
- caddr_t buf; /* mmap'ed buffer for the entire input file */
+ char *buf; /* mmap'ed buffer for the entire input file */
off_t buf_len; /* length of the input file */
struct stat sb;
@@ -131,8 +131,8 @@ int gz_compress_mmap(FILE *in, gzFile out) {
if (buf_len <= 0) return Z_ERRNO;
/* Now do the actual mmap: */
- buf = mmap((caddr_t) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0);
- if (buf == (caddr_t)(-1)) return Z_ERRNO;
+ buf = mmap((void *)0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0);
+ if (buf == (char *)(-1)) return Z_ERRNO;
/* Compress the whole file at once: */
len = PREFIX(gzwrite)(out, (char *)buf, (unsigned)buf_len);
diff --git a/test/minigzip.c b/test/minigzip.c
index a09fcdcc24..da45d48cc3 100644
--- a/test/minigzip.c
+++ b/test/minigzip.c
@@ -134,7 +134,7 @@ int gz_compress_mmap(FILE *in, gzFile out) {
if (buf_len <= 0) return Z_ERRNO;
/* Now do the actual mmap: */
- buf = mmap((char *) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0);
+ buf = mmap((void *)0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0);
if (buf == (char *)(-1)) return Z_ERRNO;
/* Compress the whole file at once: */