summaryrefslogtreecommitdiff
path: root/source4/torture/raw
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-29 22:42:07 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-29 23:29:23 +0100
commit54a5c398aaa1d53b5892c9b0aa5539ae7da651da (patch)
tree29ed15d9f18f7de856f7436ce816736ec3521559 /source4/torture/raw
parentd38cd9b671dcd0b607e2ba265c6578dc78903386 (diff)
downloadsamba-54a5c398aaa1d53b5892c9b0aa5539ae7da651da.tar.gz
samba-54a5c398aaa1d53b5892c9b0aa5539ae7da651da.tar.bz2
samba-54a5c398aaa1d53b5892c9b0aa5539ae7da651da.zip
s4:torture - prefer the termination "return"s at the end of two unittests
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Mon Nov 29 23:29:23 CET 2010 on sn-devel-104
Diffstat (limited to 'source4/torture/raw')
-rw-r--r--source4/torture/raw/tconrate.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/torture/raw/tconrate.c b/source4/torture/raw/tconrate.c
index b7ec15698d..329cdd4383 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,