diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-03-28 10:19:21 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-03-28 10:19:21 +1100 |
commit | de80e63efa857e39144650117985e9148eab033e (patch) | |
tree | 09493025db566fe829cd9ae23dc534d7af69b351 /source4/lib | |
parent | b422a78df24201392232df10cf6a1ca1a522807e (diff) | |
parent | e15b35e3897e63b9e815a04101436439d4aebdef (diff) | |
download | samba-de80e63efa857e39144650117985e9148eab033e.tar.gz samba-de80e63efa857e39144650117985e9148eab033e.tar.bz2 samba-de80e63efa857e39144650117985e9148eab033e.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-local
(This used to be commit 59d8d17093efac3a177a032f2e121ea6f43a96c8)
Diffstat (limited to 'source4/lib')
-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"); + } } } |