All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch tabled 1/1] use true/false for bool
@ 2010-10-29  3:38 Pete Zaitcev
  2010-10-29  5:51 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Pete Zaitcev @ 2010-10-29  3:38 UTC (permalink / raw)
  To: Jeff Garzik, Project Hail List

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;

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

* Re: [patch tabled 1/1] use true/false for bool
  2010-10-29  3:38 [patch tabled 1/1] use true/false for bool Pete Zaitcev
@ 2010-10-29  5:51 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2010-10-29  5:51 UTC (permalink / raw)
  To: Pete Zaitcev; +Cc: Project Hail List

On 10/28/2010 11:38 PM, Pete Zaitcev wrote:
> 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(-)

applied


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

end of thread, other threads:[~2010-10-29  5:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-29  3:38 [patch tabled 1/1] use true/false for bool Pete Zaitcev
2010-10-29  5:51 ` Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.