diff options
Diffstat (limited to 'man3')
| -rw-r--r-- | man3/shm_open.3 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/man3/shm_open.3 b/man3/shm_open.3 index bba4eb8266..24cc6a4032 100644 --- a/man3/shm_open.3 +++ b/man3/shm_open.3 @@ -382,7 +382,7 @@ main(int argc, char *argv[]) /* Map the object into the caller\(aqs address space */ - struct shmbuf *shmp = mmap(NULL, sizeof(struct shmbuf), + struct shmbuf *shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (shmp == MAP_FAILED) @@ -471,7 +471,7 @@ main(int argc, char *argv[]) if (fd == \-1) errExit("shm_open"); - struct shmbuf *shmp = mmap(NULL, sizeof(struct shmbuf), + struct shmbuf *shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (shmp == MAP_FAILED) |
