diff options
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2019-05-09 21:17:24 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-05-16 19:08:29 +0000 |
commit | 749f1290ce654d2d47e84ff455212b008de6b54c (patch) | |
tree | 1dbe7267a2d47b9fe89c835d3b480f031e72721b | |
parent | 0fa490e8476a2a5020ff2c253167b8a9454e8b97 (diff) | |
download | samba-749f1290ce654d2d47e84ff455212b008de6b54c.tar.gz |
lib:util: Fix tfork return value if sigprocmask fails
Returning a non-zero value from a function with bool as return value is
the same as returning true. Change the return value to false if
sigprocmask or pthread_sigmask fails to indicate failure.
Detected with the help of cppcheck.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu May 16 19:08:29 UTC 2019 on sn-devel-184
-rw-r--r-- | lib/util/tests/tfork.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util/tests/tfork.c b/lib/util/tests/tfork.c index ef3a6f717d0..8a6197fc00f 100644 --- a/lib/util/tests/tfork.c +++ b/lib/util/tests/tfork.c @@ -490,7 +490,7 @@ static bool test_tfork_threads(struct torture_context *tctx) ret = sigprocmask(SIG_UNBLOCK, &set, NULL); #endif if (ret != 0) { - return -1; + return false; } for (i = 0; i < num_threads; i++) { |