[SCM] Samba Shared Repository - branch master updated
Matthias Dieter Wallnöfer
mdw at samba.org
Mon Nov 29 15:30:01 MST 2010
The branch, master has been updated
via 54a5c39 s4:torture - prefer the termination "return"s at the end of two unittests
from d38cd9b Fix bug discovered with "encryped passwords = no".
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 54a5c398aaa1d53b5892c9b0aa5539ae7da651da
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Mon Nov 29 22:42:07 2010 +0100
s4:torture - prefer the termination "return"s at the end of two unittests
Autobuild-User: Matthias Dieter Wallnöfer <mdw at samba.org>
Autobuild-Date: Mon Nov 29 23:29:23 CET 2010 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source4/torture/basic/base.c | 6 ++++--
source4/torture/raw/tconrate.c | 9 +++++++--
2 files changed, 11 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index 9953573..0e168ed 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -1340,7 +1340,7 @@ static bool run_iometer(struct torture_context *tctx,
for (i=0; i<num_reads; i++) {
ssize_t res;
if (ops++ > torture_numops) {
- return true;
+ break;
}
res = smbcli_read(cli->tree, fnum, buf,
random() % filesize, sizeof(buf));
@@ -1351,7 +1351,7 @@ static bool run_iometer(struct torture_context *tctx,
for (i=0; i<num_writes; i++) {
ssize_t res;
if (ops++ > torture_numops) {
- return true;
+ break;
}
res = smbcli_write(cli->tree, fnum, 0, buf,
random() % filesize, sizeof(buf));
@@ -1360,6 +1360,8 @@ static bool run_iometer(struct torture_context *tctx,
smbcli_errstr(cli->tree)));
}
}
+
+ return true;
}
/**
diff --git a/source4/torture/raw/tconrate.c b/source4/torture/raw/tconrate.c
index b7ec156..329cdd4 100644
--- a/source4/torture/raw/tconrate.c
+++ b/source4/torture/raw/tconrate.c
@@ -123,18 +123,23 @@ done:
static bool children_remain(void)
{
+ bool res;
+
/* Reap as many children as possible. */
for (;;) {
pid_t ret = waitpid(-1, NULL, WNOHANG);
if (ret == 0) {
/* no children ready */
- return true;
+ res = true;
+ break;
}
if (ret == -1) {
/* no children left. maybe */
- return errno == ECHILD ? false : true;
+ res = errno != ECHILD;
+ break;
}
}
+ return res;
}
static double rate_convert_secs(unsigned count,
--
Samba Shared Repository
More information about the samba-cvs
mailing list