Re: [PATCH] 2.5.59 : drivers/char/ip2/i2lib.c

From: Valdis.Kletnieks@vt.edu
Date: Fri Feb 07 2003 - 12:15:13 EST


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


- 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/



This archive was generated by hypermail 2b29 : Fri Feb 07 2003 - 22:00:23 EST