Return the booleanized next(tbl) result directly to indicate an empty table.
Signed-off-by: Konrad Schwarz <
konrad....@siemens.com>
Signed-off-by: Christian Storm <
christi...@siemens.com>
---
suricatta/server_wfx.lua | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/suricatta/server_wfx.lua b/suricatta/server_wfx.lua
index 8cfd980b..3f22097c 100644
--- a/suricatta/server_wfx.lua
+++ b/suricatta/server_wfx.lua
@@ -211,8 +211,7 @@ end
--- @param tbl table Table to test for emptiness
--- @return boolean # `true` if empty, `false` if not
function M.utils.table.is_empty(tbl)
- local index, _ = next(tbl)
- return not index and true or false
+ return not next(tbl)
end
--- Enquote a String array's elements.
--
2.55.0