mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-14 19:05:37 +00:00
lib: format macro slashes
Signed-off-by: Donald Lee <dlqs@gmx.com>
This commit is contained in:
parent
5090d7249f
commit
8a79921ca3
@ -192,31 +192,33 @@ int _frrscript_call_lua(struct lua_function_state *lfs, int nargs);
|
|||||||
* 0 if the script ran successfully, nonzero otherwise.
|
* 0 if the script ran successfully, nonzero otherwise.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define frrscript_call(fs, f, ...) \
|
#define frrscript_call(fs, f, ...) \
|
||||||
({ \
|
({ \
|
||||||
struct lua_function_state lookup = {.name = f}; \
|
struct lua_function_state lookup = {.name = f}; \
|
||||||
struct lua_function_state *lfs; \
|
struct lua_function_state *lfs; \
|
||||||
lfs = hash_lookup(fs->lua_function_hash, &lookup); \
|
lfs = hash_lookup(fs->lua_function_hash, &lookup); \
|
||||||
lfs == NULL ? ({ \
|
lfs == NULL ? ({ \
|
||||||
zlog_err( \
|
zlog_err( \
|
||||||
"Lua script call: tried to call '%s' in '%s' which was not loaded", \
|
"Lua script call: tried to call '%s' in '%s' which was not loaded", \
|
||||||
f, fs->name); \
|
f, fs->name); \
|
||||||
1; \
|
1; \
|
||||||
}) \
|
}) \
|
||||||
: ({ \
|
: ({ \
|
||||||
MAP_LISTS(ENCODE_ARGS, ##__VA_ARGS__); \
|
MAP_LISTS(ENCODE_ARGS, ##__VA_ARGS__); \
|
||||||
_frrscript_call_lua(lfs, PP_NARG(__VA_ARGS__)); \
|
_frrscript_call_lua( \
|
||||||
}) != 0 \
|
lfs, PP_NARG(__VA_ARGS__)); \
|
||||||
? ({ \
|
}) != 0 \
|
||||||
zlog_err( \
|
? ({ \
|
||||||
"Lua script call: '%s' in '%s' returned non-zero exit code", \
|
zlog_err( \
|
||||||
f, fs->name); \
|
"Lua script call: '%s' in '%s' returned non-zero exit code", \
|
||||||
1; \
|
f, fs->name); \
|
||||||
}) \
|
1; \
|
||||||
: ({ \
|
}) \
|
||||||
MAP_LISTS(DECODE_ARGS, ##__VA_ARGS__); \
|
: ({ \
|
||||||
0; \
|
MAP_LISTS(DECODE_ARGS, \
|
||||||
}); \
|
##__VA_ARGS__); \
|
||||||
|
0; \
|
||||||
|
}); \
|
||||||
})
|
})
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user