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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 22 Jul 2007 22:43:25 +0200
From:	Jörn Engel <joern@...fs.org>
To:	Gabriel C <nix.or.die@...glemail.com>
Cc:	Jörn Engel <joern@...fs.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	David Woodhouse <dwmw2@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: drivers/mtd/devices/doc2000.c - address of 'eccbuf' will always evaluate as 'true' , warnings

On Sun, 22 July 2007 22:29:29 +0200, Gabriel C wrote:
> 
> @@ -896,25 +896,6 @@ static int doc_write(struct mtd_info *mtd, loff_t to, size_t len,
>  		/* Let the caller know we completed it */
>  		*retlen += len;
>  
> -		if (eccbuf) {
> -			unsigned char x[8];
> -			size_t dummy;
> -			int ret;
> -
> -			/* Write the ECC data to flash */
> -			for (di=0; di<6; di++)
> -				x[di] = eccbuf[di];
> -
> -			x[6]=0x55;
> -			x[7]=0x55;
> -
> -			ret = doc_write_oob_nolock(mtd, to, 8, &dummy, x);
> -			if (ret) {
> -				mutex_unlock(&this->lock);
> -				return ret;
> -			}
> -		}
> -
>  		to += len;
>  		left -= len;
>  		buf += len;

You should remove the condition, but not the conditional code.

Jörn

-- 
A quarrel is quickly settled when deserted by one party; there is
no battle unless there be two.
-- Seneca
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ