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

Valdis.Kletnieks@vt.edu
Fri, 07 Feb 2003 12:15:13 -0500


--==_Exmh_-701383059P
Content-Type: text/plain; charset=us-ascii

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

--==_Exmh_-701383059P Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) Comment: Exmh version 2.5 07/13/2001

iD8DBQE+Q+mhcC3lWbTT17ARAmkOAJ9Dm62bZL1g/j4h5qX4vJbUyyhISwCgivPK Kf9+dyhus17aM2sf5K2ehhM= =5QQR -----END PGP SIGNATURE-----

--==_Exmh_-701383059P-- - 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/