luci-lib-ip: always return table for dump, even if empty
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 22 Jan 2015 22:58:42 +0000 (23:58 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 22 Jan 2015 22:59:11 +0000 (23:59 +0100)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
libs/luci-lib-ip/src/ip.c

index b72b6c05caad2ad3c2eb50818232bee67a388a22..affd5e1d692f6aec059aef35dba8b241faff927a 100644 (file)
@@ -962,7 +962,7 @@ static int _route_dump(lua_State *L, struct dump_filter *filter)
 
 out:
        nl_cb_put(cb);
-       return (s.index > 0 && s.callback == 0);
+       return (s.callback == 0);
 }
 
 static int route_get(lua_State *L)
@@ -1191,7 +1191,7 @@ static int neighbor_dump(lua_State *L)
 
 out:
        nl_cb_put(cb);
-       return (st.index > 0 && st.callback == 0);
+       return (st.callback == 0);
 }