lkml.org 
[lkml]   [2000]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] serial167.c: bugfixes and cleanups
From
Date
>>>>> "Tigran" == Tigran Aivazian <tigran@veritas.com> 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.

Jes
-
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:0.065 / U:16.784 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site