2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-04 16:25:17 +00:00

sflow functions: fix unused parameter warnings for sflow functions

Several 'sflow' functions (sfl_poller_tick, sfl_sampler_tick, and
sfl_receiver_tick) have unused parameter 'now' in their signatures. This patch
removes that parameter from their signatures to fix compilation warnings.

Also, according to the 'utilities/checkpatch.py', there should be an indent
between 'for' keyword an opening left paren. Additionally, the line containing
'for' keyword had to end with an opening curly brace. Therefore, I did a bit of
formatting besides removing the unused parameter in the modified code.

Signed-off-by: Sergey Madaminov <sergey.madaminov@gmail.com>
Reviewed-by: Michael Santana <msantana@redhat.com>
Signed-off-by: Alin-Gabriel Serdean <aserdean@ovn.org>
This commit is contained in:
Sergey Madaminov
2021-09-15 16:32:19 -05:00
committed by Alin-Gabriel Serdean
parent 7796253db6
commit 13d05b8e5b
5 changed files with 15 additions and 9 deletions

View File

@@ -129,14 +129,20 @@ void sfl_agent_tick(SFLAgent *agent, time_t now)
SFLPoller *pl = agent->pollers;
agent->now = now;
/* samplers use ticks to decide when they are sampling too fast */
for(; sm != NULL; sm = sm->nxt) sfl_sampler_tick(sm, now);
for (; sm != NULL; sm = sm->nxt) {
sfl_sampler_tick(sm);
}
/* pollers use ticks to decide when to ask for counters */
for(; pl != NULL; pl = pl->nxt) sfl_poller_tick(pl, now);
for (; pl != NULL; pl = pl->nxt) {
sfl_poller_tick(pl);
}
/* receivers use ticks to flush send data. By doing this
* step last we ensure that fresh counters polled during
* sfl_poller_tick() above will be flushed promptly.
*/
for(; rcv != NULL; rcv = rcv->nxt) sfl_receiver_tick(rcv, now);
for (; rcv != NULL; rcv = rcv->nxt) {
sfl_receiver_tick(rcv);
}
}
/*_________________---------------------------__________________