On Tue, 22 Oct 2024 06:20:43 +0000 Mingjin Ye <mingjinx...@intel.com> wrote:
> +static int > +ice_parse_clean_subtask_period(__rte_unused const char *key, > + const char *value, void *args) > +{ > + int *num = (int *)args; Cast of void * unnecessary in C. You probably want period to be unsigned not signed. > + int tmp; > + > + errno = 0; > + tmp = atoi(value); > + if (tmp < 0) { > + PMD_DRV_LOG(WARNING, "%s: \"%s\" is not greater than or equal > to zero", > + key, value); > + return -1; > + } > + > + *num = tmp; > + > + return 0; > +} Prefer strtoul() when parsing values, it allows for better error handling.