linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Halasa <khc@pm.waw.pl>
To: "Josef 'Jeff' Sipek" <jeffpc@optonline.net>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][TRIVIAL] Bugzilla bug # 322 - double logical operator drivers/char/sx.c
Date: 07 Aug 2003 02:32:28 +0200	[thread overview]
Message-ID: <m3znimgvdv.fsf@defiant.pm.waw.pl> (raw)
In-Reply-To: <200308061830.05586.jeffpc@optonline.net>

Josef 'Jeff' Sipek <jeffpc@optonline.net> writes:

> 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;
>  		}
>  

While the first version seems to be a notation error (i < X > 0 is
equivalent to i < X) the changed version doesn't need X > 0 either
as TIMEOUT_1 (and TIMEOUT_2 respectively) is a positive #define.

So I think it should be just (i=0; i < TIMEOUT_1 ;i++) and so on.
-- 
Krzysztof Halasa
Network Administrator

  reply	other threads:[~2003-08-07 15:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3znimgvdv.fsf@defiant.pm.waw.pl \
    --to=khc@pm.waw.pl \
    --cc=jeffpc@optonline.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).