From: Alan T. DeKok Date: Mon, 29 Apr 2019 14:32:20 +0000 (-0400) Subject: move assignment to where it's used X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb3aef4111c2e58bf0f1931d1ebf2f60e149b24d;p=thirdparty%2Ffreeradius-server.git move assignment to where it's used --- diff --git a/src/lib/unlang/compile.c b/src/lib/unlang/compile.c index 14854152f83..3c854dbc40a 100644 --- a/src/lib/unlang/compile.c +++ b/src/lib/unlang/compile.c @@ -3145,11 +3145,14 @@ static unlang_t *compile_item(unlang_t *parent, cs = cf_item_to_section(ci); modrefname = cf_section_name1(cs); name2 = cf_section_name2(cs); - if (!name2) name2 = ""; for (i = 0; compile_table[i].name != NULL; i++) { if (strcmp(modrefname, compile_table[i].name) == 0) { - *modname = name2; + if (name2) { + *modname = name2; + } else { + *modname = ""; + } /* * Some blocks can be empty. The rest need