From 67b64027b2a5fc97d58f1298e5b99da1bbe78a68 Mon Sep 17 00:00:00 2001 From: Donald Lee Date: Fri, 23 Jul 2021 17:15:38 +0800 Subject: [PATCH] lib: parens around macro args Signed-off-by: Donald Lee --- lib/frrscript.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; \ }) \ : ({ \