summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2017-09-13 14:00:47 +0200
committerTobias Klauser <tklauser@distanz.ch>2017-09-13 14:00:47 +0200
commit285ac73006e2e4af6e0e4cb0eaa178b13cdcba8f (patch)
treeec844061a87498b1b339533faf3872c08a0716fd
parentc9a22110551ecc364c43b490fcbcd855dac1f744 (diff)
ifpps: fix unintendet assignment
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 <tklauser@distanz.ch>
-rw-r--r--ifpps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ifpps.c b/ifpps.c
index 8296add..501fa50 100644
--- a/ifpps.c
+++ b/ifpps.c
@@ -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;