[PATCH v3 1/1] app/test-flow-perf: fix division or module by zero

Thomas Monjalon thomas at monjalon.net
Sun Mar 12 15:05:44 CET 2023


24/01/2023 11:38, Mohammad Iqbal Ahmad:
> Fix division or module by zero reported by coverity scan.
> Updated .mailmap
> 
> Coverity issue: 373870
> Fixes: bf3688f1e816 ("app/flow-perf: add insertion rate calculation")
> 
> Signed-off-by: Mohammad Iqbal Ahmad <mahmad at marvell.com>
> ---
>  			if (strcmp(lgopts[opt_idx].name,
>  					"rules-batch") == 0) {
> -				rules_batch = atoi(optarg);
> +				n = atoi(optarg);
> +				if (n > 0)
> +					rules_batch = n;
> +				else
> +					rte_exit(EXIT_FAILURE,
> +							"flow rules_batch should be > 0\n");

The option name is rules-batch (with a hyphen). Will fix while merging.

Applied, thanks.





More information about the dev mailing list