[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4812CD2C.30307@grandegger.com>
Date: Sat, 26 Apr 2008 08:35:24 +0200
From: Wolfgang Grandegger <wg@...ndegger.com>
To: David Miller <davem@...emloft.net>
CC: oliver.hartkopp@...kswagen.de, xemul@...nvz.org,
socketcan-core@...ts.berlios.de, netdev@...r.kernel.org,
urs.thuermann@...kswagen.de
Subject: Re: [PATCH][CAN]: Fix copy_from_user() results interpretation.
David Miller wrote:
> From: Wolfgang Grandegger <wg@...ndegger.com>
> Date: Sat, 26 Apr 2008 08:19:31 +0200
>
>> What about removing the assignment "err =" in that case. It's confusing
>> otherwise and maybe the variable err is even obsolete.
>
> Sure, but when fixing a bug it's better to have a completely
> localized change like this.
>
> Not something which restructures the code unnecessarily at
> the same time, that make it so much harder to review and
> validate.
Well, really,
if (func(x))
return -EFAULT;
instead of
err = func(x);
if (err)
return -EFAULT;
is more straight forward and less confusing and I do not understand, why
it should be harder to review.
Wolfgang.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists