lkml.org 
[lkml]   [2005]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: uinput crash and fix
On Sun, Oct 16, 2005 at 12:01:15AM +0200, Mattia Dongili wrote:
> On Sat, Oct 15, 2005 at 11:29:12PM +0200, emard@softhome.net wrote:
> > HI
> [...]
> > req = uinput_request_find(udev, ff_up.request_id);
> > - if (!(req && req->code == UI_FF_UPLOAD && req->u.effect)) {
> > + if (!req) {
>
> out of curiosity, instead of adding a whole if block wouldn't be easier
> to just write
>
> if (!req || !(req->code == UI_FF_UPLOAD && req->u.effect)) {
>
> in order to evaulate !req first and eventually dereference it?

hmmm... no. it's simply the same ( (A && B) == (!A || !B)). So your
patch seems wrong too.

goodnight :P
--
mattia
:wq!
-
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-10-16 00:50    [W:0.051 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site