lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241021160809.089261a9@hermes.local>
Date: Mon, 21 Oct 2024 16:08:09 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: chia-yu.chang@...ia-bell-labs.com
Cc: netdev@...r.kernel.org, dsahern@...il.com, davem@...emloft.net,
 jhs@...atatu.com, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
 dsahern@...nel.org, ij@...nel.org, ncardwell@...gle.com,
 koen.de_schepper@...ia-bell-labs.com, g.white@...leLabs.com,
 ingemar.s.johansson@...csson.com, mirja.kuehlewind@...csson.com,
 cheshire@...le.com, rs.ietf@....at, Jason_Livingood@...cast.com,
 vidhi_goel@...le.com, Olga Albisser <olga@...isser.org>, Oliver Tilmans
 <olivier.tilmans@...ia.com>, Bob Briscoe <research@...briscoe.net>, Henrik
 Steen <henrist@...rist.net>
Subject: Re: [PATCH iproute2-next 1/1] tc: add dualpi2 scheduler module

On Tue, 22 Oct 2024 00:15:59 +0200
chia-yu.chang@...ia-bell-labs.com wrote:

> +static int get_float(float *val, const char *arg, float min, float max)
> +{
> +	float res;
> +	char *ptr;
> +
> +	if (!arg || !*arg)
> +		return -1;
> +	res = strtof(arg, &ptr);
> +	if (!ptr || ptr == arg || *ptr)
> +		return -1;
> +	if (res < min || res > max)
> +		return -1;
> +	*val = res;
> +	return 0;
> +}
> +

Please put this in lib/utils.c and make it common.
Will need to replace the version in iplink_can.c

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ