diff --git a/Makefile b/Makefile index a59581b..3b40a26 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ PROJECT=cow AUTHOR=Avril (Flanchan) -VERSION=0.1.1 +VERSION=0.1.2 ifeq ($(PREFIX),) PREFIX := /usr/local diff --git a/src/cow.c b/src/cow.c index cd5e95a..02a2eb5 100644 --- a/src/cow.c +++ b/src/cow.c @@ -67,7 +67,7 @@ static inline int shm_fd(size_t size) int fd = memfd_create("cow_create:shm_fd", 0); #endif if(fd<=0) die("cow_create:shm_fd:memfd_create"); - ftruncate(fd, size); + if(ftruncate(fd, size) != 0) die("cow_create:shm_fd:ftruncate"); return fd; }