From 4881ed00ca1d0ab156863c6821db670c70f5d0ea Mon Sep 17 00:00:00 2001
From: Jeremy Allison <jra@samba.org>
Date: Fri, 4 Jan 2008 23:26:47 -0800
Subject: More logical operation on bool. Jeremy. (This used to be commit
 7e8e91aeb3795d26ae8591665981bc42d8b6122f)

---
 source3/nmbd/nmbd_elections.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/source3/nmbd/nmbd_elections.c b/source3/nmbd/nmbd_elections.c
index bafe87c044..b50d215b91 100644
--- a/source3/nmbd/nmbd_elections.c
+++ b/source3/nmbd/nmbd_elections.c
@@ -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.
-- 
cgit