From: Alan T. DeKok Date: Tue, 21 Sep 2021 14:53:57 +0000 (-0400) Subject: start numbering at 1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ffa4aa3e923dda2aa48d5dd9db98929d57dc65c;p=thirdparty%2Ffreeradius-server.git start numbering at 1 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. --- diff --git a/src/lib/unlang/compile.c b/src/lib/unlang/compile.c index 3ea331accb..39472aca42 100644 --- a/src/lib/unlang/compile.c +++ b/src/lib/unlang/compile.c @@ -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