diff options
Diffstat (limited to 'source4/lib/replace/test')
-rw-r--r-- | source4/lib/replace/test/os2_delete.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/lib/replace/test/os2_delete.c b/source4/lib/replace/test/os2_delete.c index c6ef180017..b45c135355 100644 --- a/source4/lib/replace/test/os2_delete.c +++ b/source4/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"); + } } } |