]> git.armaanb.net Git - opendoas.git/commitdiff
move yyparse decl next to yyfp
authortedu <tedu>
Wed, 5 Oct 2016 17:40:25 +0000 (17:40 +0000)
committerDuncaen <mail@duncano.de>
Mon, 11 Dec 2017 15:28:56 +0000 (16:28 +0100)
doas.c
doas.h

diff --git a/doas.c b/doas.c
index 6c1b14d3f36b234c2d37c22479a8af226c43118d..a4686eff792593851d065e8209a219bb32350f62 100644 (file)
--- a/doas.c
+++ b/doas.c
@@ -160,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");
@@ -176,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);
diff --git a/doas.h b/doas.h
index 0f96d1e369e088ef312068c52587f17718439fa9..a371eb6244499467e7c70056b6e82320aa3c47a1 100644 (file)
--- a/doas.h
+++ b/doas.h
@@ -31,8 +31,6 @@ extern int parse_errors;
 
 char **prepenv(struct rule *);
 
-int yyparse(void);
-
 #define PERMIT 1
 #define DENY   2