summaryrefslogtreecommitdiff
path: root/lib/frrscript.c
diff options
context:
space:
mode:
authorDonald Lee <dlqs@gmx.com>2021-07-18 06:25:54 +0800
committerDonald Lee <dlqs@gmx.com>2021-07-19 23:28:01 +0800
commit2ce634e2ad6cdfddb79e00cda01f21280d521279 (patch)
tree464be67314a491632cd13167cc10a94f85c05199 /lib/frrscript.c
parent596b44af8a51c79a7e23447c8c45baf0d6638a63 (diff)
lib: formatting
Signed-off-by: Donald Lee <dlqs@gmx.com>
Diffstat (limited to 'lib/frrscript.c')
-rw-r--r--lib/frrscript.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/frrscript.c b/lib/frrscript.c
index b3f8a9f6f5..b385ad7eaa 100644
--- a/lib/frrscript.c
+++ b/lib/frrscript.c
@@ -205,12 +205,12 @@ void *frrscript_get_result(struct frrscript *fs, const char *function_name,
lfs = hash_lookup(fs->lua_function_hash, &lookup);
- if (lfs == NULL) {
+ if (lfs == NULL)
return NULL;
- }
/* results table is idx 1 on the stack, getfield pushes our item to idx
- * 2*/
+ * 2
+ */
lua_getfield(lfs->L, 1, name);
if (lua_isnil(lfs->L, -1)) {
lua_pop(lfs->L, 1);
@@ -259,6 +259,7 @@ int frrscript_load(struct frrscript *fs, const char *function_name,
/* Set up the Lua script */
lua_State *L = luaL_newstate();
+
frrlua_export_logging(L);
char script_name[MAXPATHLEN * 2];