Skip to content

Commit

Permalink
ifpps: fix unintendet assignment
Browse files Browse the repository at this point in the history
Variable rate is assigned instead of compared in the check of the
interval in relation to the line rate. Fix it and at the same time fix
the compared against interval value to match the message we show if the
condition is fulfilled.

Signed-off-by: Tobias Klauser <[email protected]>
  • Loading branch information
tklauser committed Sep 13, 2017
1 parent c9a2211 commit 285ac73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ifpps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1153,8 +1153,8 @@ static int screen_main(const char *ifname, uint64_t ms_interval,

panic_handler_add(on_panic_handler, NULL);

if (((rate > SPEED_1000 && ms_interval <= 1000) ||
(rate = SPEED_1000 && ms_interval < 1000)) &&
if (((rate > SPEED_1000 && ms_interval <= 10000) ||
(rate == SPEED_1000 && ms_interval < 1000)) &&
!suppress_warnings)
need_info = true;

Expand Down

0 comments on commit 285ac73

Please sign in to comment.