summaryrefslogtreecommitdiffstats
path: root/examples/c4cat.c
diff options
context:
space:
mode:
authorMarkus Mittendrein <git@maxmitti.tk>2019-03-18 19:45:34 +0100
committerMarkus Mittendrein <git@maxmitti.tk>2019-03-18 19:45:34 +0100
commitec6f8c4fe162500645109eb24856051c97bfb2fe (patch)
tree95cc40de4f88c3d1e1ee4dcac1b093df984126ec /examples/c4cat.c
parent984c5b553954ebed29d01b29083323e03f78ac9d (diff)
downloadcc4group-ec6f8c4fe162500645109eb24856051c97bfb2fe.tar.gz
cc4group-ec6f8c4fe162500645109eb24856051c97bfb2fe.zip
Remove the extra argument from cc4group_mmap and cc4group_munmap as its actually not needed
Diffstat (limited to 'examples/c4cat.c')
-rw-r--r--examples/c4cat.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/c4cat.c b/examples/c4cat.c
index 3da506e..ee0ed9b 100644
--- a/examples/c4cat.c
+++ b/examples/c4cat.c
@@ -18,8 +18,7 @@ bool catNormalFile(const char* const path, const off_t size)
return false;
}
- void* extra;
- void* mappedFile = cc4group_mmap(NULL, size, PROT_READ, MAP_PRIVATE, file, 0, &extra);
+ void* mappedFile = cc4group_mmap(NULL, size, PROT_READ, MAP_PRIVATE, file, 0);
if(close(file) == -1)
{
@@ -37,7 +36,7 @@ bool catNormalFile(const char* const path, const off_t size)
fprintf(stderr, "ERROR: Writing file contents of \"%s\" to stdout: %s\n", path, strerror(errno));
}
- if(cc4group_munmap(mappedFile, size, extra) == -1)
+ if(cc4group_munmap(mappedFile, size) == -1)
{
fprintf(stderr, "ERROR: Unmapping \"%s\": %s\n", path, strerror(errno));
}