lkml.org 
[lkml]   [2000]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cleanup on selection.c
On Fri, Aug 25, 2000 at 11:55:52AM -0400, Matthew Wilcox wrote:
> On Fri, Aug 25, 2000 at 11:06:41AM -0300, Arnaldo Carvalho de Melo wrote:
> > nope, look at copy_from_user_ret in include/asm/uaccess.h
> >
> > #define copy_from_user_ret(to,from,n,retval) ({ if (copy_from_user(to,from,n)) return retval; })
>
> you're misunderstanding this gcc-ism. if the define were:
>
> #define copy_from_user_ret(to,from,n,retval) if (copy_from_user(to,from,n)) \
> return retval;
>
> then your original code was correct.

ok. i was wrong. i was confused with:

({ int y = foo (); int z;
if (y > 0) z = y;
else z = - y;
z; })

which is a special gcc-ism. sorry, the original patch was correct.

--
Revolutions do not require corporate support.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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