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:	Fri, 6 Dec 2013 10:11:12 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Joe Perches <joe@...ches.com>
Cc:	Will Tange <bh34rt@...il.com>, gregkh@...uxfoundation.org,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: silicom: fix 'return is not a function,
 parentheses are not required' in bpctl_mod.c

On Thu, Dec 05, 2013 at 03:29:22PM -0800, Joe Perches wrote:
> On Fri, 2013-12-06 at 02:21 +0300, Dan Carpenter wrote:
> > On Thu, Dec 05, 2013 at 03:09:15PM -0800, Joe Perches wrote:
> > > On Fri, 2013-12-06 at 01:50 +0300, Dan Carpenter wrote:
> > > > On Thu, Dec 05, 2013 at 10:23:53PM +0100, Will Tange wrote:
> 
> Ah.
> 
> Then maybe use a single ?: or a ! instead
> 
> 	return ret ? 0 : 1;
> or
> 	return !ret;
> 

You still have to handle the negative.

	if (ret < 0)
		return ret;

	return !ret;

regards,
dan carpenter
--
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