From: Donald Sharp Date: Tue, 19 Jan 2021 14:29:50 +0000 (-0500) Subject: lib: Fix up str2prefix usage in lua code X-Git-Tag: base_7.6~16^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F7888%2Fhead;p=mirror%2Ffrr.git lib: Fix up str2prefix usage in lua code Two new coverity issues from inclusion of new lua code. Signed-off-by: Donald Sharp --- diff --git a/lib/command.c b/lib/command.c index b9d607a101..b34fa7ff3e 100644 --- a/lib/command.c +++ b/lib/command.c @@ -2313,7 +2313,8 @@ DEFUN(script, "Script name (same as filename in /etc/frr/scripts/\n") { struct prefix p; - str2prefix("1.2.3.4/24", &p); + + (void)str2prefix("1.2.3.4/24", &p); struct frrscript *fs = frrscript_load(argv[1]->arg, NULL); diff --git a/lib/frrlua.c b/lib/frrlua.c index 3c270b2340..d8aaa3aa3c 100644 --- a/lib/frrlua.c +++ b/lib/frrlua.c @@ -76,7 +76,7 @@ void *lua_toprefix(lua_State *L, int idx) struct prefix *p = XCALLOC(MTYPE_TMP, sizeof(struct prefix)); lua_getfield(L, idx, "network"); - str2prefix(lua_tostring(L, -1), p); + (void)str2prefix(lua_tostring(L, -1), p); lua_pop(L, 1); return p;