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]
Date:	Sat, 31 Jan 2009 12:35:12 -0800
From:	Daniel Walker <dwalker@...o99.com>
To:	Roel Kluin <roel.kluin@...il.com>
Cc:	netdev@...r.kernel.org, lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: variables reach -1, but 0 tested

On Sat, 2009-01-31 at 11:36 +0100, Roel Kluin wrote:

>  
> -	while (limit--) {
> +	while (--limit) {
>  		val = phy_read(phy, MII_BMCR);
>  		if (val >= 0 && (val & BMCR_RESET) == 0)
>  			break;

It looks like these are checked for <= to 0 , are these changes strictly
nessesary?

>  
>  	/* make sure EEPROM has finished loading before setting GPIO_CFG */
>  	timeout=1000;
> -	while ( timeout-- && (SMC_GET_E2P_CMD(lp) & E2P_CMD_EPC_BUSY_)) {
> +	while ( --timeout && (SMC_GET_E2P_CMD(lp) & E2P_CMD_EPC_BUSY_)) {
>  		udelay(10);

If your doing "timeOut" to "timeout" below may as well drop the space
above after the "(" ..


Daniel

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ