From 58c0b415efbd693fc443044f88518a975f4d2781 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 11 Feb 2009 12:00:19 +0100 Subject: Fix Coverity ID 519 (NEGATIVE_RETURNS) --- tests/ftruncate.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/ftruncate.c b/tests/ftruncate.c index 93282782ee..d3e5de3afb 100644 --- a/tests/ftruncate.c +++ b/tests/ftruncate.c @@ -16,6 +16,10 @@ main() int *buf; int fd = open(DATA,O_RDWR|O_CREAT|O_TRUNC,0666); + if (fd == -1) { + exit(1); + } + ftruncate(fd, LEN); unlink(DATA); -- cgit