lkml.org 
[lkml]   [2013]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] staging: silicom: fix 'return is not a function, parentheses are not required' in bpctl_mod.c
From
Date
On Fri, 2013-12-06 at 10:11 +0300, Dan Carpenter wrote:
> 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;

Of course. Apologies for not being clear. I meant
using that ?: or ! after the first if (ret < 0) as
you wrote.



\
 
 \ /
  Last update: 2013-12-06 08:41    [W:0.041 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site