diff options
author | Andrew Yourtchenko <ayourtch@gmail.com> | 2016-12-07 12:20:07 +0000 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2016-12-07 12:20:07 +0000 |
commit | cd06b728920e7119582de4d9a09ac71034706b2a (patch) | |
tree | cdf2122db4bdd5510b3a337560bd5bfd4f2d6316 /plugins/acl-plugin/acl/l2sess_node.c | |
parent | 288e8930ee7f1cf4980c06c167ef4e0cdf559528 (diff) |
Fix coverity CIDs 157344, 157343, 157341, 157340, 157339, 157336
The macros used to verify the validity of sw_if_index passed in
the API calls have puzzled coverity.
Even though the issues are false positives, the checks are rather
simple, so edited them to avoid using the preprocessor macros,
it makes the code easier to follow.
Added the null check for 157336.
Change-Id: I24651346851215b236e53e682261e1f91219b381
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'plugins/acl-plugin/acl/l2sess_node.c')
-rw-r--r-- | plugins/acl-plugin/acl/l2sess_node.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/acl-plugin/acl/l2sess_node.c b/plugins/acl-plugin/acl/l2sess_node.c index 3e735f470e7..d83029ea055 100644 --- a/plugins/acl-plugin/acl/l2sess_node.c +++ b/plugins/acl-plugin/acl/l2sess_node.c @@ -486,6 +486,9 @@ check_idle_sessions (l2sess_main_t * sm, u32 sw_if_index, u64 now) #endif sm->timer_wheel_next_expiring_time = now + sm->timer_wheel_tick; + if (PREDICT_FALSE ( 0 == sm->data_from_advancing_timing_wheel )) { + return; + } if (PREDICT_FALSE (_vec_len (sm->data_from_advancing_timing_wheel) > 0)) { |