summaryrefslogtreecommitdiff
path: root/flowtop.c
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-07-25 20:22:47 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2015-07-26 20:32:23 +0200
commitb9db88f68c11bb52f8edadbc3b365a552cd9489b (patch)
treef294eefeda777383e9cf8471aaffa59844814a2e /flowtop.c
parentad7cfbf4efca7a2716eba89994f5f8f8167cd51c (diff)
flowtop: Use prev & next vars in flow_list_find_prev_id(...)
Replace n & tmp variables to more understandable prev & next. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'flowtop.c')
-rw-r--r--flowtop.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/flowtop.c b/flowtop.c
index 314be80..53b4f97 100644
--- a/flowtop.c
+++ b/flowtop.c
@@ -291,16 +291,16 @@ static struct flow_entry *flow_list_find_id(struct flow_list *fl,
static struct flow_entry *flow_list_find_prev_id(struct flow_list *fl,
uint32_t id)
{
- struct flow_entry *n = rcu_dereference(fl->head), *tmp;
+ struct flow_entry *prev = rcu_dereference(fl->head), *next;
- if (n->flow_id == id)
+ if (prev->flow_id == id)
return NULL;
- while ((tmp = rcu_dereference(n->next)) != NULL) {
- if (tmp->flow_id == id)
- return n;
+ while ((next = rcu_dereference(prev->next)) != NULL) {
+ if (next->flow_id == id)
+ return prev;
- n = tmp;
+ prev = next;
}
return NULL;