]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Fix up str2prefix usage in lua code 7888/head
authorDonald Sharp <sharpd@nvidia.com>
Tue, 19 Jan 2021 14:29:50 +0000 (09:29 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 19 Jan 2021 14:29:50 +0000 (09:29 -0500)
Two new coverity issues from inclusion of new lua code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
lib/command.c
lib/frrlua.c

index b9d607a1018ebf815c0a1b426d9248b6b04680c4..b34fa7ff3eb7091b857001bcbcd23ed4d7cf3a6e 100644 (file)
@@ -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);
 
index 3c270b2340963e6828d453d5f5d51ba940572c6f..d8aaa3aa3c6d9abeefff0ad3f966029232e6813d 100644 (file)
@@ -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;