From 459a1d58b1b5f90320a843234067654959fab8b1 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 28 Jun 2010 10:44:58 +0200 Subject: s3-nmbd: Leave the sync function if there are no syncs. Found by clang-analyzer. --- source3/nmbd/nmbd_browsesync.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/nmbd/nmbd_browsesync.c') diff --git a/source3/nmbd/nmbd_browsesync.c b/source3/nmbd/nmbd_browsesync.c index b630fd234d..73d953e726 100644 --- a/source3/nmbd/nmbd_browsesync.c +++ b/source3/nmbd/nmbd_browsesync.c @@ -644,6 +644,11 @@ void sync_all_dmbs(time_t t) } } + /* leave if we don't have to do any syncs */ + if (count == 0) { + return; + } + /* sync with a probability of 1/count */ for (work=unicast_subnet->workgrouplist; work; work = work->next) { if (strcmp(lp_workgroup(), work->work_group)) { -- cgit