lkml.org 
[lkml]   [2003]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] 2.5.59 : drivers/char/ip2/i2lib.c
From
Date
On Fri, 07 Feb 2003 12:17:45 EST, Frank Davis said:

> + if ((1 == i2QueueCommands(PTYPE_INLINE, pCh, 0, 1, CMD_STOPFL))
&& (i2QueueCommands(PTYPE_INLINE, pCh, 0, 1, CMD_STOPFL) > 0 )) {

Hmm... if ((1 == A) && (A > 0)) {

Unless i2QueueCommands has a side-effect on being re-evaluated (which isn't
guaranteed to happen), it looks like this can be simplified a bit,
since the '&& (A > 0)' is superfluous.

I think the code started as 'if A == 1' and became 'if A > 0', or vice
versa, and somebody needs to check what's *REALLY* intended...


--
Valdis Kletnieks
Computer Systems Senior Engineer
Virginia Tech

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.037 / U:1.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site