summaryrefslogtreecommitdiff
path: root/source3/lib/replace/test/os2_delete.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/replace/test/os2_delete.c')
-rw-r--r--source3/lib/replace/test/os2_delete.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/lib/replace/test/os2_delete.c b/source3/lib/replace/test/os2_delete.c
index c6ef180017..b45c135355 100644
--- a/source3/lib/replace/test/os2_delete.c
+++ b/source3/lib/replace/test/os2_delete.c
@@ -39,8 +39,15 @@ static void create_files(void)
int i;
for (i=0;i<NUM_FILES;i++) {
char fname[40];
+ int fd;
sprintf(fname, TESTDIR "/test%u.txt", i);
- close(open(fname, O_CREAT|O_RDWR, 0600)) == 0 || FAILED("close");
+ fd = open(fname, O_CREAT|O_RDWR, 0600);
+ if (fd < 0) {
+ FAILED("open");
+ }
+ if (close(fd) != 0) {
+ FAILED("close");
+ }
}
}