]> git.armaanb.net Git - opendoas.git/blobdiff - parse.y
as a result of the env rework, arraylen() is only used in parse.y. move it there...
[opendoas.git] / parse.y
diff --git a/parse.y b/parse.y
index 5e776794069eec005906ef20f6c65eabde3222a5..e89fb1c482e04bbf29f1fb0ff8213d77129e9f8d 100644 (file)
--- a/parse.y
+++ b/parse.y
@@ -58,6 +58,18 @@ static int obsolete_warned = 0;
 static void yyerror(const char *, ...);
 static int yylex(void);
 
+static size_t
+arraylen(const char **arr)
+{
+       size_t cnt = 0;
+
+       while (*arr) {
+               cnt++;
+               arr++;
+       }
+       return cnt;
+}
+
 %}
 
 %token TPERMIT TDENY TAS TCMD TARGS