]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
start numbering at 1
authorAlan T. DeKok <aland@freeradius.org>
Tue, 21 Sep 2021 14:53:57 +0000 (10:53 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 21 Sep 2021 16:54:14 +0000 (12:54 -0400)
some "internal" instructions are build dynamically, as with
unlang_module_push().  The instruction number there will be
zero, as there's currently no way to track these dynamic instructions.

As a result, we want to reserve array entry 0 as the canonical
"dynamic" instruction number, which won't get their stats tracked.

src/lib/unlang/compile.c

index 3ea331accbca5c748b95bedecec78a7a12b99e4b..39472aca42f0b2bab79c0d194594e7a4657e484e 100644 (file)
@@ -45,7 +45,7 @@ RCSID("$Id$")
 
 #define UNLANG_IGNORE ((unlang_t *) -1)
 
-static unsigned int unlang_number = 0;
+static unsigned int unlang_number = 1;
 
 /*
  *     For simplicity, this is just array[unlang_number].  Once we