[OpenWrt-Devel] [PATCH] lua: remove pointless double check of autoload flag

karlp at tweak.net.au karlp at tweak.net.au
Thu Nov 5 12:27:48 EST 2015


From: Karl Palsson <karlp at remake.is>

In e2b1433b the autoload param went from being an enumerated type to a
simple boolean.  Drop the pointless double check of this flag.

Signed-off-by: Karl Palsson <karlp at remake.is>
---

 lua/uci.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lua/uci.c b/lua/uci.c
index 6ba7da0..8035ad6 100644
--- a/lua/uci.c
+++ b/lua/uci.c
@@ -113,9 +113,7 @@ find_package(lua_State *L, struct uci_context *ctx, const char *str, bool al)
 		goto done;
 	}
 
-	if (al == true)
-		uci_load(ctx, name, &p);
-	else if (al) {
+	if (al) {
 		uci_load(ctx, name, &p);
 	}
 
-- 
2.4.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list