summaryrefslogtreecommitdiff
path: root/src/lib/shm_rbuff.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/shm_rbuff.c')
-rw-r--r--src/lib/shm_rbuff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/shm_rbuff.c b/src/lib/shm_rbuff.c
index 2e296bf0..c8230108 100644
--- a/src/lib/shm_rbuff.c
+++ b/src/lib/shm_rbuff.c
@@ -90,7 +90,7 @@ static struct shm_rbuff * rbuff_create(pid_t pid,
if (fd == -1)
goto fail_open;
- if ((flags & O_CREAT) && ftruncate(fd, SHM_RB_FILE_SIZE - 1) < 0)
+ if ((flags & O_CREAT) && ftruncate(fd, SHM_RB_FILE_SIZE) < 0)
goto fail_truncate;
shm_base = mmap(NULL, SHM_RB_FILE_SIZE, MM_FLAGS, MAP_SHARED, fd, 0);