[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-463-g451fc9a
Michael Adam
obnox at samba.org
Thu Mar 27 10:47:04 GMT 2008
The branch, v3-2-test has been updated
via 451fc9ae05f841883081a334e179cf31625a772c (commit)
from e16ca32b8e0485ceafee6a2ff62dc88e96329ec4 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 451fc9ae05f841883081a334e179cf31625a772c
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