Re: [PATCH v4 iproute2-next 1/1] tc: add dualpi2 scheduler module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 16 Mar 2025 16:39:17 +0100
chia-yu.chang@xxxxxxxxxxxxxxxxxxx wrote:

> +static int get_packets(uint32_t *val, const char *arg)
> +{
> +	unsigned long res;
> +	char *ptr;
> +
> +	if (!arg || !*arg)
> +		return -1;
> +	res = strtoul(arg, &ptr, 10);
> +	if (!ptr || ptr == arg ||
> +	    (strcmp(ptr, "p") && strcmp(ptr, "pkt") && strcmp(ptr, "pkts") &&
> +	     strcmp(ptr, "packet") && strcmp(ptr, "packets")))
> +		return -1;

No shortcuts please.
We ran into this with matches() and arg conflicts already.




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux