From 0eacfa32687730ae6d7dbc67201165fac26682d6 Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Wed, 13 Sep 2017 09:18:08 -0400 Subject: VPP-972: fix coverity warnings in the stats scraper Change-Id: I8843e57105c6c29bcdaf1e6e3bf8e9caf6bfd2ec Signed-off-by: Dave Barach --- src/vpp/stats/stats.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vpp/stats/stats.c b/src/vpp/stats/stats.c index c78a8aef..ff52c4db 100644 --- a/src/vpp/stats/stats.c +++ b/src/vpp/stats/stats.c @@ -1495,7 +1495,7 @@ static void } rp = pool_elt_at_index (sm->stats_registrations, p[0]); - if (!rp->stats_registrations & INTERFACE_COMBINED_COUNTERS) // Client but doesn't want this. + if (!(rp->stats_registrations & INTERFACE_COMBINED_COUNTERS)) // Client but doesn't want this. { clib_warning ("pid %d: already disabled for interface COMBINED stats...", @@ -1576,7 +1576,7 @@ vl_api_want_ip4_fib_stats_t_handler (vl_api_want_ip4_fib_stats_t * mp) } rp = pool_elt_at_index (sm->stats_registrations, p[0]); - if (!rp->stats_registrations & IP4_FIB_COUNTERS) // Client but doesn't want this. + if (!(rp->stats_registrations & IP4_FIB_COUNTERS)) // Client but doesn't want this. { clib_warning ("pid %d: already disabled for interface ip4 fib...", mp->pid); @@ -1656,7 +1656,7 @@ vl_api_want_ip6_fib_stats_t_handler (vl_api_want_ip6_fib_stats_t * mp) } rp = pool_elt_at_index (sm->stats_registrations, p[0]); - if (!rp->stats_registrations & IP6_FIB_COUNTERS) // Client but doesn't want this. + if (!(rp->stats_registrations & IP6_FIB_COUNTERS)) // Client but doesn't want this. { clib_warning ("pid %d: already disabled for interface ip6 fib...", mp->pid); -- cgit 1.2.3-korg