summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-02-11 12:00:19 +0100
committerVolker Lendecke <vl@samba.org>2009-02-11 12:20:42 +0100
commit58c0b415efbd693fc443044f88518a975f4d2781 (patch)
treeb62ecd1dd1b4859af549b6988f28311f30cef360
parentd520f85b09c11753ff6d709a00d253710304f9cd (diff)
downloadsamba-58c0b415efbd693fc443044f88518a975f4d2781.tar.gz
samba-58c0b415efbd693fc443044f88518a975f4d2781.tar.bz2
samba-58c0b415efbd693fc443044f88518a975f4d2781.zip
Fix Coverity ID 519 (NEGATIVE_RETURNS)
-rw-r--r--tests/ftruncate.c4
1 files changed, 4 insertions, 0 deletions
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);