From 45e56ec4c260ab19acc90fe1fe67be709968857b Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 19 Jan 2021 09:29:50 -0500 Subject: [PATCH] lib: Fix up str2prefix usage in lua code Two new coverity issues from inclusion of new lua code. Signed-off-by: Donald Sharp --- lib/command.c | 3 ++- lib/frrlua.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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; -- 2.39.5