summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-05-07 09:21:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:16:54 -0500
commitce5f1afc75d0ece2ebc06eb06ec404c2a8467480 (patch)
treee6fe479b434ce3fd34af5f3439319dfb3684715a /source3
parent64d729c84d7eacc26c47e186cf1f755304ca9a29 (diff)
downloadsamba-ce5f1afc75d0ece2ebc06eb06ec404c2a8467480.tar.gz
samba-ce5f1afc75d0ece2ebc06eb06ec404c2a8467480.tar.bz2
samba-ce5f1afc75d0ece2ebc06eb06ec404c2a8467480.zip
r15483: Fix 'declaration after code' warnings.
Volker (This used to be commit 7729799be9984a02a2a309289067b7500696e657)
Diffstat (limited to 'source3')
-rw-r--r--source3/nmbd/nmbd_elections.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/nmbd/nmbd_elections.c b/source3/nmbd/nmbd_elections.c
index 6e8e8429be..50e1372936 100644
--- a/source3/nmbd/nmbd_elections.c
+++ b/source3/nmbd/nmbd_elections.c
@@ -166,13 +166,16 @@ void run_elections(time_t t)
struct subnet_record *subrec;
+ START_PROFILE(run_elections);
+
/* Send election packets once every 2 seconds - note */
- if (lastime && (t - lastime < 2))
+ if (lastime && (t - lastime < 2)) {
+ END_PROFILE(run_elections);
return;
+ }
lastime = t;
- START_PROFILE(run_elections);
for (subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec)) {
struct work_record *work;
@@ -267,10 +270,11 @@ void process_election(struct subnet_record *subrec, struct packet_struct *p, cha
struct work_record *work;
unstring workgroup_name;
+ START_PROFILE(election);
+
pull_ascii_nstring(server_name, sizeof(server_name), buf+13);
pull_ascii_nstring(workgroup_name, sizeof(workgroup_name), dgram->dest_name.name);
- START_PROFILE(election);
server_name[15] = 0;
DEBUG(3,("process_election: Election request from %s at IP %s on subnet %s for workgroup %s.\n",