ctdb-daemon: make bool assignment more obvious
authorMichael Adam <obnox@samba.org>
Mon, 20 Jun 2016 08:42:43 +0000 (10:42 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 21 Jun 2016 09:48:29 +0000 (11:48 +0200)
(showing what is the rule and what is the exception)

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jun 21 11:48:29 CEST 2016 on sn-devel-144

ctdb/server/ctdbd.c

index 420add476d5626d555a30d10a395208706f78734..e09611f8e50ccc317b5d83f3031a133f16b95415 100644 (file)
@@ -294,10 +294,9 @@ int main(int argc, const char *argv[])
        }
 
        ctdb->valgrinding = (options.valgrinding == 1);
-       if ((options.valgrinding == 1) || (options.nosetsched == 1)) {
+       ctdb->do_setsched = (options.nosetsched != 1);
+       if (ctdb->valgrinding) {
                ctdb->do_setsched = false;
-       } else {
-               ctdb->do_setsched = true;
        }
 
        ctdb->public_addresses_file = options.public_address_list;