diff options
author | John Crispin <john@openwrt.org> | 2013-12-27 21:15:20 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2013-12-27 21:15:20 +0000 |
commit | d1156bca0a2e3981aad62d6cc9155f71c01c3915 (patch) | |
tree | a445ddce6261d9b524417ef6de6bd6ab0a1fa32d /package/network/config/swconfig/src/cli.c | |
parent | 834204bda64d78c5c2d6228c236246291a1ed7d8 (diff) | |
download | upstream-d1156bca0a2e3981aad62d6cc9155f71c01c3915.tar.gz upstream-d1156bca0a2e3981aad62d6cc9155f71c01c3915.tar.bz2 upstream-d1156bca0a2e3981aad62d6cc9155f71c01c3915.zip |
swconfig: remove useless variables, return -1 on errors
spotted with cppcheck
Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr>
SVN-Revision: 39170
Diffstat (limited to 'package/network/config/swconfig/src/cli.c')
-rw-r--r-- | package/network/config/swconfig/src/cli.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/package/network/config/swconfig/src/cli.c b/package/network/config/swconfig/src/cli.c index 2eb73bea38..fa3dfdf6f2 100644 --- a/package/network/config/swconfig/src/cli.c +++ b/package/network/config/swconfig/src/cli.c @@ -178,7 +178,6 @@ swconfig_load_uci(struct switch_dev *dev, const char *name) { struct uci_context *ctx; struct uci_package *p = NULL; - struct uci_element *e; int ret = -1; ctx = uci_alloc_context(); @@ -206,7 +205,6 @@ int main(int argc, char **argv) struct switch_dev *dev; struct switch_attr *a; struct switch_val val; - int err; int i; int cmd = CMD_NONE; @@ -289,6 +287,7 @@ int main(int argc, char **argv) if(!a) { fprintf(stderr, "Unknown attribute \"%s\"\n", ckey); + retval = -1; goto out; } } @@ -351,5 +350,5 @@ int main(int argc, char **argv) out: swlib_free_all(dev); - return 0; + return retval; } |