summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-01-29 17:00:50 -0500
committerJune McEnroe <june@causal.agency>2021-01-29 17:00:50 -0500
commitbc56d4b09a281ac46443c9931ae20e9298753da5 (patch)
tree7f294e37c0fc7d8736bfd14fe0b334ab32789d75
parentMove gpl.c and agpl.c templates out of etc (diff)
downloadsrc-bc56d4b09a281ac46443c9931ae20e9298753da5.tar.gz
src-bc56d4b09a281ac46443c9931ae20e9298753da5.zip
Use int when checking for EOF
Diffstat (limited to '')
-rw-r--r--bin/bit.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/bit.y b/bin/bit.y
index 9d977a34..1119bce6 100644
--- a/bin/bit.y
+++ b/bin/bit.y
@@ -88,7 +88,7 @@ expr:
 
 static int lexInt(uint64_t base) {
 	yylval = 0;
-	for (char ch; EOF != (ch = getchar());) {
+	for (int ch; EOF != (ch = getchar());) {
 		uint64_t digit = base;
 		if (ch == '_') {
 			continue;
@@ -108,7 +108,7 @@ static int lexInt(uint64_t base) {
 }
 
 static int yylex(void) {
-	char ch;
+	int ch;
 	while (isblank(ch = getchar()));
 	if (ch == '\'') {
 		yylval = 0;