]> git.armaanb.net Git - opendoas.git/blobdiff - parse.y
Fix a sign comparison warning.
[opendoas.git] / parse.y
diff --git a/parse.y b/parse.y
index ee5f11d04ab8b8c5ae60dc7749b78b106b31bcfb..7b1b45ac84e8249eee46f8caf2e30191432648dc 100644 (file)
--- a/parse.y
+++ b/parse.y
 %{
 #include <sys/types.h>
 #include <ctype.h>
-#include <unistd.h>
-#include <stdint.h>
+#include <err.h>
 #include <stdarg.h>
 #include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
 #include <string.h>
-#include <err.h>
+#include <unistd.h>
+
+#include "openbsd.h"
 
 #include "doas.h"
 
@@ -200,7 +203,7 @@ int
 yylex(void)
 {
        char buf[1024], *ebuf, *p, *str;
-       int i, c, quotes = 0, escape = 0, qpos = -1, nonkw = 0;
+       int c, quotes = 0, escape = 0, qpos = -1, nonkw = 0;
 
        p = buf;
        ebuf = buf + sizeof(buf);
@@ -303,6 +306,7 @@ eow:
                        goto repeat;
        }
        if (!nonkw) {
+               unsigned i;
                for (i = 0; i < sizeof(keywords) / sizeof(keywords[0]); i++) {
                        if (strcmp(buf, keywords[i].word) == 0)
                                return keywords[i].token;