lkml.org 
[lkml]   [2001]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Possible problem with zero-copy TCP and sendfile()
On Tue, 17 Apr 2001, Wolfgang Rohdewald wrote:

> On Tuesday 17 April 2001 22:36, Jan Kasprzak wrote:
> > +    if (len == -1 || len > 0 && len < count) {
>
> are you sure there are no missing () ?
>
> if ((len == -1) || (len > 0) && (len < count)) {
>
> assumig that && has precedence over || (I believe so)

I don't this makes it that much cleaner.
If you want to make it clear what this does you should write it more like
this:

if (len == -1 || (len > 0 && len < count))

I don't think it's the == and < , > that confusing but the || and &&

/Martin

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.146 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site