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>
This commit is contained in:
parent
c98e8f3932
commit
83c27f59f6
@ -471,7 +471,7 @@ l2fwd_parse_args(int argc, char **argv)
|
|||||||
/* timer period */
|
/* timer period */
|
||||||
case 'T':
|
case 'T':
|
||||||
timer_period = l2fwd_parse_timer_period(optarg)
|
timer_period = l2fwd_parse_timer_period(optarg)
|
||||||
* 1000 * TIMER_MILLISECOND;
|
* (int64_t)(1000 * TIMER_MILLISECOND);
|
||||||
if (timer_period < 0) {
|
if (timer_period < 0) {
|
||||||
printf("invalid timer period\n");
|
printf("invalid timer period\n");
|
||||||
l2fwd_usage(prgname);
|
l2fwd_usage(prgname);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user