summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemy Horton <remy.horton@intel.com>2015-12-10 09:50:07 +0000
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-12-10 22:27:20 +0100
commit83c27f59f61fa1da2b0bd67adba1fa040e2af0f8 (patch)
treeb9e00d933f660e70d166b92e9745772046a0cb83
parentc98e8f3932d88f77c7f1acd7551406200795c5aa (diff)
downloaddpdk-83c27f59f61fa1da2b0bd67adba1fa040e2af0f8.zip
dpdk-83c27f59f61fa1da2b0bd67adba1fa040e2af0f8.tar.gz
dpdk-83c27f59f61fa1da2b0bd67adba1fa040e2af0f8.tar.xz
examples/l2fwd-keepalive: fix integer overflow
Fix Coverity warning with potential 32-bit integer multiplication overflow where final result is expected to be 64-bit. >>> CID 120144 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) Fixes: e64833f2273a ("examples/l2fwd-keepalive: add sample application") Signed-off-by: Remy Horton <remy.horton@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com>
-rw-r--r--examples/l2fwd-keepalive/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index 8d7b09e..f4d52f2 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -471,7 +471,7 @@ l2fwd_parse_args(int argc, char **argv)
/* timer period */
case 'T':
timer_period = l2fwd_parse_timer_period(optarg)
- * 1000 * TIMER_MILLISECOND;
+ * (int64_t)(1000 * TIMER_MILLISECOND);
if (timer_period < 0) {
printf("invalid timer period\n");
l2fwd_usage(prgname);