summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-06-28 10:44:58 +0200
committerAndreas Schneider <asn@samba.org>2010-06-28 12:56:13 +0200
commit459a1d58b1b5f90320a843234067654959fab8b1 (patch)
tree99a8c9415f3ef5665956a79c882fa52e14d61dab /source3
parent34de8a00dd69d8ffba98babf141f484da54a472a (diff)
downloadsamba-459a1d58b1b5f90320a843234067654959fab8b1.tar.gz
samba-459a1d58b1b5f90320a843234067654959fab8b1.tar.bz2
samba-459a1d58b1b5f90320a843234067654959fab8b1.zip
s3-nmbd: Leave the sync function if there are no syncs.
Found by clang-analyzer.
Diffstat (limited to 'source3')
-rw-r--r--source3/nmbd/nmbd_browsesync.c5
1 files changed, 5 insertions, 0 deletions
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)) {