fix one more unused-but-set variable
authorFelix Fietkau <nbd@openwrt.org>
Tue, 19 Jul 2011 20:39:56 +0000 (22:39 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 19 Jul 2011 20:39:56 +0000 (22:39 +0200)
lua/uci.c

index be0246bf4dbadc3f50e79eb86a6f8344236221e4..67ec67181d6804bc875949623d6539dd904b6976 100644 (file)
--- a/lua/uci.c
+++ b/lua/uci.c
@@ -640,7 +640,6 @@ uci_lua_package_cmd(lua_State *L, enum pkg_cmd cmd)
 
        uci_foreach_element_safe(&ctx->root, tmp, e) {
                struct uci_package *p = uci_to_package(e);
-               int ret = UCI_ERR_INVAL;
 
                if (ptr.p && (ptr.p != p))
                        continue;
@@ -648,13 +647,13 @@ uci_lua_package_cmd(lua_State *L, enum pkg_cmd cmd)
                ptr.p = p;
                switch(cmd) {
                case CMD_COMMIT:
-                       ret = uci_commit(ctx, &p, false);
+                       uci_commit(ctx, &p, false);
                        break;
                case CMD_SAVE:
-                       ret = uci_save(ctx, p);
+                       uci_save(ctx, p);
                        break;
                case CMD_REVERT:
-                       ret = uci_revert(ctx, &ptr);
+                       uci_revert(ctx, &ptr);
                        break;
                }
        }