[SCM] Samba Shared Repository - branch v4-0-test updated -
release-4-0-0alpha2-1365-g4ae4692
Michael Adam
obnox at samba.org
Thu Mar 27 11:10:51 GMT 2008
The branch, v4-0-test has been updated
via 4ae4692bc6c6da15483a6f4a3363cdc23121efc7 (commit)
from 9342c4f5ff2be16c9771fd07fbec87076af2e681 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test
- Log -----------------------------------------------------------------
commit 4ae4692bc6c6da15483a6f4a3363cdc23121efc7
Author: Michael Adam <obnox at samba.org>
Date: Thu Mar 27 11:26:33 2008 +0100
libreplace: fix coverity ID 517 - untangle close from open in test/os2_delete.c
This is not a proper bug but the code is clearer now
and we are tracking failure of open separate from that of close.
Michael
-----------------------------------------------------------------------
Summary of changes:
source/lib/replace/test/os2_delete.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/replace/test/os2_delete.c b/source/lib/replace/test/os2_delete.c
index c6ef180..b45c135 100644
--- a/source/lib/replace/test/os2_delete.c
+++ b/source/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");
+ }
}
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list