diff --git a/lib/frrscript.h b/lib/frrscript.h index 03a8b9ec6a..905ffe1623 100644 --- a/lib/frrscript.h +++ b/lib/frrscript.h @@ -216,13 +216,13 @@ int _frrscript_call_lua(struct lua_function_state *lfs, int nargs); */ #define frrscript_call(fs, f, ...) \ ({ \ - struct lua_function_state lookup = {.name = f}; \ + struct lua_function_state lookup = {.name = (f)}; \ struct lua_function_state *lfs; \ - lfs = hash_lookup(fs->lua_function_hash, &lookup); \ + lfs = hash_lookup((fs)->lua_function_hash, &lookup); \ lfs == NULL ? ({ \ zlog_err( \ "frrscript: '%s.lua': '%s': tried to call this function but it was not loaded", \ - fs->name, f); \ + (fs)->name, (f)); \ 1; \ }) \ : ({ \ @@ -233,7 +233,7 @@ int _frrscript_call_lua(struct lua_function_state *lfs, int nargs); ? ({ \ zlog_err( \ "frrscript: '%s.lua': '%s': this function called but returned non-zero exit code. No variables modified.", \ - fs->name, f); \ + (fs)->name, (f)); \ 1; \ }) \ : ({ \