lkml.org 
[lkml]   [2014]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Revert "platform/x86/toshiba-apci.c possible bad if test?"

On Wed, 20 Aug 2014, Ari Sundholm wrote:

> - if (sscanf(buf, "%i", &mode) != 1 || (mode != 2 || mode != 1))
> + if (sscanf(buf, "%i", &mode) != 1 && (mode != 2 || mode != 1))
> return -EINVAL;

Note that the condition still looks wrong even after the revert, as
(mode != 2 || mode != 1) is always true. Anybody guess what the actual
intent was?

Best regards,
Ari Sundholm
asundhol@cs.hut.fi


\
 
 \ /
  Last update: 2014-08-20 20:21    [W:0.065 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site