Messages in this thread | | | Date | Wed, 20 Aug 2014 21:16:52 +0300 (EEST) | From | Ari Sundholm <> | Subject | Re: [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
| |