[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnumach] 20/56: track the console buffer usage with a boolean instead o
From: |
Samuel Thibault |
Subject: |
[gnumach] 20/56: track the console buffer usage with a boolean instead of an int |
Date: |
Sat, 28 Sep 2013 12:43:14 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch master
in repository gnumach.
commit cbe805c2122b8b46b1fbe7c6b1d8f69cd22fb901
Author: Marin Ramesa <address@hidden>
Date: Wed Sep 11 12:27:48 2013 +0200
track the console buffer usage with a boolean instead of an int
A variable that keeps track of the console buffer usage should never receive
values other than 0 and 1, so constrain it's value range to boolean. Plus,
it's
more readable this way.
* device/cons.c (consbufused): Use boolean_t instead of an int.
---
device/cons.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/device/cons.c b/device/cons.c
index f26f22c..a220723 100644
--- a/device/cons.c
+++ b/device/cons.c
@@ -54,7 +54,7 @@ void (*romputc)() = 0;
*/
static char consbuf[CONSBUFSIZE] = { 0 };
static char *consbp = consbuf;
-static int consbufused = 0;
+static boolean_t consbufused = FALSE;
#endif
void
@@ -106,7 +106,7 @@ cninit()
if (++cbp == &consbuf[CONSBUFSIZE])
cbp = consbuf;
} while (cbp != consbp);
- consbufused = 0;
+ consbufused = FALSE;
}
#endif
cn_inited = 1;
@@ -171,9 +171,9 @@ cnputc(c)
}
#if CONSBUFSIZE > 0
else {
- if (consbufused == 0) {
+ if (consbufused == FALSE) {
consbp = consbuf;
- consbufused = 1;
+ consbufused = TRUE;
memset(consbuf, 0, CONSBUFSIZE);
}
*consbp++ = c;
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/gnumach.git
- [gnumach] 36/56: add comments after endifs, (continued)
- [gnumach] 36/56: add comments after endifs, Samuel Thibault, 2013/09/28
- [gnumach] 34/56: remove register qualifiers, Samuel Thibault, 2013/09/28
- [gnumach] 33/56: remove lint code, Samuel Thibault, 2013/09/28
- [gnumach] 30/56: another small change in style for consistency, Samuel Thibault, 2013/09/28
- [gnumach] 27/56: another small change in style for consistency, Samuel Thibault, 2013/09/28
- [gnumach] 25/56: remove register qualifiers, Samuel Thibault, 2013/09/28
- [gnumach] 22/56: remove register qualifiers., Samuel Thibault, 2013/09/28
- [gnumach] 28/56: remove preprocessor comments, Samuel Thibault, 2013/09/28
- [gnumach] 23/56: remove register qualifiers, Samuel Thibault, 2013/09/28
- [gnumach] 26/56: small style changes for consistency, Samuel Thibault, 2013/09/28
- [gnumach] 20/56: track the console buffer usage with a boolean instead of an int,
Samuel Thibault <=
- [gnumach] 21/56: track the console init with a boolean instead of an int, Samuel Thibault, 2013/09/28
- [gnumach] 54/56: * patches/80_missing_files.patch: Add missing files from git., Samuel Thibault, 2013/09/28
- [gnumach] 50/56: Imported Upstream version 1.4, Samuel Thibault, 2013/09/28