Skip to content

Commit 90bc219

Browse files
committed
lua/bytevarlib: return luaL_error to suppress warning
Even though luaL_error never returns, use a return to make it clear. Also prevents a compiler warning about idx being used uninitialized.
1 parent 093232d commit 90bc219

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/util-lua-bytevarlib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static int LuaBytevarMap(lua_State *L)
5656

5757
DetectByteIndexType idx;
5858
if (!DetectByteRetrieveSMVar(name, s, -1, &idx)) {
59-
luaL_error(L, "unknown byte_extract or byte_math variable: %s", name);
59+
return luaL_error(L, "unknown byte_extract or byte_math variable: %s", name);
6060
}
6161

6262
ld->bytevar[ld->bytevars].name = SCStrdup(name);

0 commit comments

Comments
 (0)