bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/5] track the console init with a boolean instead of an int


From: Marin Ramesa
Subject: [PATCH 3/5] track the console init with a boolean instead of an int
Date: Wed, 11 Sep 2013 12:27:49 +0200

A variable that keeps track if the console init has been called. It should
never receive values other than 0 and 1, so constrain it's possible range of 
values to a boolean.

* device/cons.c (cn_inited): Use boolean_t instead of an int.

---
 device/cons.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/device/cons.c b/device/cons.c
index a220723..ceba7f2 100644
--- a/device/cons.c
+++ b/device/cons.c
@@ -32,7 +32,7 @@
 #include <device/kmsg.h>
 #endif
 
-static int cn_inited = 0;
+static boolean_t cn_inited = FALSE;
 static struct consdev *cn_tab = 0;     /* physical console device info */
 
 /*
@@ -109,7 +109,7 @@ cninit()
                        consbufused = FALSE;
                }
 #endif
-               cn_inited = 1;
+               cn_inited = TRUE;
                return;
        }
        /*
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]