More logical operation on bool.
authorJeremy Allison <jra@samba.org>
Sat, 5 Jan 2008 07:26:47 +0000 (23:26 -0800)
committerJeremy Allison <jra@samba.org>
Sat, 5 Jan 2008 07:26:47 +0000 (23:26 -0800)
Jeremy.
(This used to be commit 7e8e91aeb3795d26ae8591665981bc42d8b6122f)

source3/nmbd/nmbd_elections.c

index bafe87c044412b66e2d011d3fada52df75054b93..b50d215b91d57c37b5287ceb9f076782c932561a 100644 (file)
@@ -336,7 +336,9 @@ bool check_elections(void)
        for (subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec)) {
                struct work_record *work;
                for (work = subrec->workgrouplist; work; work = work->next) {
-                       run_any_election |= work->RunningElection;
+                       if (work->RunningElection) {
+                               run_any_election = work->RunningElection;
+                       }
 
                        /* 
                         * Start an election if we have any chance of winning.