hail-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pete Zaitcev <zaitcev@redhat.com>
To: Jeff Garzik <jeff@garzik.org>,
	Project Hail List <hail-devel@vger.kernel.org>
Subject: [patch tabled 1/1] use true/false for bool
Date: Thu, 28 Oct 2010 21:38:08 -0600	[thread overview]
Message-ID: <20101028213808.79790d78@lembas.zaitcev.lan> (raw)

In places, I automatically typed 0 and 1 for false and true, although
the type is bool, so clean it up.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>

---
 server/storage.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

commit 769490d6c4570cc929022f9bd9cc593bc86bc602
Author: Pete Zaitcev <zaitcev@yahoo.com>
Date:   Thu Oct 28 21:34:41 2010 -0600

    Use true/false for bool.

diff --git a/server/storage.c b/server/storage.c
index cac5a96..fc232ba 100644
--- a/server/storage.c
+++ b/server/storage.c
@@ -90,7 +90,7 @@ static void stor_read_event(int fd, short events, void *userdata)
 {
 	struct open_chunk *cep = userdata;
 
-	cep->r_armed = 0;		/* no EV_PERSIST */
+	cep->r_armed = false;		/* no EV_PERSIST */
 	if (cep->rcb)
 		(*cep->rcb)(cep);
 }
@@ -99,7 +99,7 @@ static void stor_write_event(int fd, short events, void *userdata)
 {
 	struct open_chunk *cep = userdata;
 
-	cep->w_armed = 0;		/* no EV_PERSIST */
+	cep->w_armed = false;		/* no EV_PERSIST */
 	if (cep->wcb)
 		(*cep->wcb)(cep);
 }
@@ -211,7 +211,7 @@ void stor_close(struct open_chunk *cep)
 
 	if (cep->r_armed) {
 		event_del(&cep->revt);
-		cep->r_armed = 0;
+		cep->r_armed = false;
 	}
 	cep->rsize = 0;
 
@@ -262,7 +262,7 @@ void stor_abort(struct open_chunk *cep)
 
 	if (cep->r_armed) {
 		event_del(&cep->revt);
-		cep->r_armed = 0;
+		cep->r_armed = false;
 	}
 	cep->rsize = 0;
 
@@ -340,9 +340,9 @@ ssize_t stor_get_buf(struct open_chunk *cep, void *data, size_t req_len)
 	}
 
 	if (xfer_len != ret && cep->rsize && !cep->r_armed) {
-		cep->r_armed = 1;
+		cep->r_armed = true;
 		if (event_add(&cep->revt, NULL))
-			cep->r_armed = 0;
+			cep->r_armed = false;
 	}
 
 	return ret;

             reply	other threads:[~2010-10-29  3:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-29  3:38 Pete Zaitcev [this message]
2010-10-29  5:51 ` [patch tabled 1/1] use true/false for bool Jeff Garzik

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=20101028213808.79790d78@lembas.zaitcev.lan \
    --to=zaitcev@redhat.com \
    --cc=hail-devel@vger.kernel.org \
    --cc=jeff@garzik.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 read-only IMAP folder(s) and NNTP newsgroup(s).