[lkml]   [2000]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] serial167.c: bugfixes and cleanups
>>>>> "Tigran" == Tigran Aivazian <> writes:

Tigran> Hi Arnaldo, On Fri, 25 Aug 2000, Arnaldo Carvalho de Melo
Tigran> wrote:
>> - copy_to_user(retinfo,&tmp,sizeof(*retinfo)); + if
>> (copy_to_user(retinfo,&tmp,sizeof(*retinfo))) + return -EFAULT;
>> return 0;

Tigran> I think Linus already suggested that you do this:

Tigran> return copy_to_user(...) ? -EFAULT : 0;

Tigran> it is compact and intuitive.

Why? the other one will, do exactly the same and is just as
readable. It's the copy_from_user_ret() that is the real problem.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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