linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][TRIVIAL] Bugzilla bug # 322 - double logical operator drivers/char/sx.c
@ 2003-08-06 22:30 Josef 'Jeff' Sipek
  2003-08-07  0:32 ` Krzysztof Halasa
  2003-08-07  0:35 ` Timothy Miller
  0 siblings, 2 replies; 11+ messages in thread
From: Josef 'Jeff' Sipek @ 2003-08-06 22:30 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Just a simple fix to make the statements more readable. (instead of
"i < TIMEOUT > 0" the statement is divided into two, joined by &&.)

Josef 'Jeff' Sipek

--- linux-2.5/drivers/char/sx.c.orig	2003-08-06 18:23:32.000000000 -0400
+++ linux-2.5/drivers/char/sx.c	2003-08-06 18:20:03.000000000 -0400
@@ -511,13 +511,13 @@
 
 	func_enter ();
 
-	for (i=0; i < TIMEOUT_1 > 0;i++) 
+	for (i=0; (i < TIMEOUT_1) && (TIMEOUT_1 > 0);i++) 
 		if ((read_sx_byte (board, offset) & mask) == correctval) {
 			func_exit ();
 			return 1;
 		}
 
-	for (i=0; i < TIMEOUT_2 > 0;i++) {
+	for (i=0; (i < TIMEOUT_2) && (TIMEOUT_2 > 0);i++) {
 		if ((read_sx_byte (board, offset) & mask) == correctval) {
 			func_exit ();
 			return 1;
@@ -537,13 +537,13 @@
 
 	func_enter ();
 
-	for (i=0; i < TIMEOUT_1 > 0;i++) 
+	for (i=0; (i < TIMEOUT_1) && (TIMEOUT_1 > 0);i++) 
 		if ((read_sx_byte (board, offset) & mask) != badval) {
 			func_exit ();
 			return 1;
 		}
 
-	for (i=0; i < TIMEOUT_2 > 0;i++) {
+	for (i=0; (i < TIMEOUT_2) && (TIMEOUT_2 > 0);i++) {
 		if ((read_sx_byte (board, offset) & mask) != badval) {
 			func_exit ();
 			return 1;


^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH][TRIVIAL] Bugzilla bug # 322 - double logical operator drivers/char/sx.c
@ 2003-12-21  6:55 Josef 'Jeff' Sipek
  0 siblings, 0 replies; 11+ messages in thread
From: Josef 'Jeff' Sipek @ 2003-12-21  6:55 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Simple clean up patch to remove double logical operators.

Josef 'Jeff' Sipek

--- linux-2.5/drivers/char/sx.c.orig	2003-08-06 18:23:32.000000000 -0400
+++ linux-2.5/drivers/char/sx.c	2003-08-06 18:20:03.000000000 -0400
@@ -511,13 +511,13 @@
 
 	func_enter ();
 
-	for (i=0; i < TIMEOUT_1 > 0;i++) 
+	for (i=0; i < TIMEOUT_1 ;i++) 
 		if ((read_sx_byte (board, offset) & mask) == correctval) {
 			func_exit ();
 			return 1;
 		}
 
-	for (i=0; i < TIMEOUT_2 > 0;i++) {
+	for (i=0; i < TIMEOUT_2 ;i++) {
 		if ((read_sx_byte (board, offset) & mask) == correctval) {
 			func_exit ();
 			return 1;
@@ -537,13 +537,13 @@
 
 	func_enter ();
 
-	for (i=0; i < TIMEOUT_1 > 0;i++) 
+	for (i=0; i < TIMEOUT_1 ;i++) 
 		if ((read_sx_byte (board, offset) & mask) != badval) {
 			func_exit ();
 			return 1;
 		}
 
-	for (i=0; i < TIMEOUT_2 > 0;i++) {
+	for (i=0; i < TIMEOUT_2 ;i++) {
 		if ((read_sx_byte (board, offset) & mask) != badval) {
 			func_exit ();
 			return 1;


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-12-21  6:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-06 22:30 [PATCH][TRIVIAL] Bugzilla bug # 322 - double logical operator drivers/char/sx.c Josef 'Jeff' Sipek
2003-08-07  0:32 ` Krzysztof Halasa
2003-08-07  0:35 ` Timothy Miller
2003-08-07  1:26   ` Jeff Sipek
2003-08-07  3:12     ` Valdis.Kletnieks
2003-08-07  4:00       ` Rahul Karnik
2003-08-07  4:12         ` Rahul Karnik
2003-08-07  1:29   ` Josef 'Jeff' Sipek
2003-08-07  8:20   ` Jeff Sipek
2003-08-07 23:02     ` jw schultz
2003-12-21  6:55 Josef 'Jeff' Sipek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).