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:	Sun, 02 Mar 2008 20:34:04 +0300
From:	Dmitri Vorobiev <dmitri.vorobiev@...il.com>
To:	Harvey Harrison <harvey.harrison@...il.com>
CC:	Mauro Carvalho Chehab <mchehab@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] saa7146: fix sparse warnings

Harvey Harrison пишет:
> Went along with the existing file style.
> drivers/media/common/saa7146_core.c:309:6: warning: Using plain integer as NULL pointer
> drivers/media/common/saa7146_core.c:311:8: warning: Using plain integer as NULL pointer
> drivers/media/common/saa7146_core.c:319:7: warning: Using plain integer as NULL pointer
> drivers/media/common/saa7146_core.c:319:28: warning: Using plain integer as NULL pointer
> drivers/media/common/saa7146_core.c:325:7: warning: Using plain integer as NULL pointer
> drivers/media/common/saa7146_core.c:325:28: warning: Using plain integer as NULL pointer
> drivers/media/common/saa7146_fops.c:275:12: warning: Using plain integer as NULL pointer
> 
> Signed-off-by: Harvey Harrison <harvey.harrison@...il.com>
> ---
>  drivers/media/common/saa7146_core.c |    8 ++++----
>  drivers/media/common/saa7146_fops.c |    2 +-
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/media/common/saa7146_core.c b/drivers/media/common/saa7146_core.c
> index 168a8d3..8c755a1 100644
> --- a/drivers/media/common/saa7146_core.c
> +++ b/drivers/media/common/saa7146_core.c
> @@ -306,9 +306,9 @@ static irqreturn_t interrupt_hw(int irq, void *dev_id)
>  		return IRQ_NONE;
>  	}
>  
> -	if( 0 != (dev->ext)) {
> +	if( NULL != (dev->ext)) {

At the risk of looking an idiot, I'm taking a liberty to ask what is
the point in explicit comparison to zero in conditional operators? Is
it not a fundamental C idiom to write

if (a) {
}

instead of

if (a != 0) {
}

and, similarly, to write

if (!a) {
}

instead of

if (a == 0) {
}

?

Thanks,

Dmitri


--
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