summary refs log tree commit diff
path: root/parse.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2018-04-26 22:59:30 +0200
committerQuentin Carbonneaux <quentin@c9x.me>2018-04-26 22:59:30 +0200
commitf1c865f4bc7dff5a5d844049a73ad82463186e9f (patch)
tree7b83c71a1ab77b86507b11f6e823d85eed4da397 /parse.c
parente7a387585992a9378ba2f2319c2408c62a0b14e8 (diff)
downloadroux-f1c865f4bc7dff5a5d844049a73ad82463186e9f.tar.gz
more compiler warnings...
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/parse.c b/parse.c
index 592e079..3c4200e 100644
--- a/parse.c
+++ b/parse.c
@@ -173,11 +173,9 @@ getint()
 
 	n = 0;
 	c = fgetc(inf);
-	m = 0;
-	switch (c) {
-	case '-': m = 1;
-	case '+': c = fgetc(inf);
-	}
+	m = (c == '-');
+	if (m || c == '+')
+		c = fgetc(inf);
 	do {
 		n = 10*n + (c - '0');
 		c = fgetc(inf);
@@ -240,6 +238,7 @@ lex()
 	case '#':
 		while ((c=fgetc(inf)) != '\n' && c != EOF)
 			;
+		/* fall through */
 	case '\n':
 		lnum++;
 		return Tnl;