]> git.armaanb.net Git - opendoas.git/blobdiff - doas.c
move yyparse decl next to yyfp
[opendoas.git] / doas.c
diff --git a/doas.c b/doas.c
index 7feaafc771af07a87ce54763b224a3c4ec0ae719..a4686eff792593851d065e8209a219bb32350f62 100644 (file)
--- a/doas.c
+++ b/doas.c
@@ -55,20 +55,6 @@ usage(void)
        exit(1);
 }
 
-size_t
-arraylen(const char **arr)
-{
-       size_t cnt = 0;
-
-       if (arr) {
-               while (*arr) {
-                       cnt++;
-                       arr++;
-               }
-       }
-       return cnt;
-}
-
 static int
 parseuid(const char *s, uid_t *uid)
 {
@@ -174,6 +160,7 @@ static void
 parseconfig(const char *filename, int checkperms)
 {
        extern FILE *yyfp;
+       extern int yyparse(void);
        struct stat sb;
 
        yyfp = fopen(filename, "r");
@@ -190,7 +177,6 @@ parseconfig(const char *filename, int checkperms)
                        errx(1, "%s is not owned by root", filename);
        }
 
-       yyparse();
        fclose(yyfp);
        if (parse_errors)
                exit(1);