summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2023-05-07 14:36:27 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2023-05-07 14:36:27 +0200
commitd017ac75f05c65e2e736f6dea271b69d7c9524bb (patch)
treeaf9b96d63e50d464ae5ea6402ed2a9789f78ccec
parent838d8d6556dc6eecc1999bc482d3631b869b1630 (diff)
downloadabase-d017ac75f05c65e2e736f6dea271b69d7c9524bb.tar.gz
abase-d017ac75f05c65e2e736f6dea271b69d7c9524bb.tar.bz2
ipconfig: fixed some compiler warnings
-rw-r--r--ifconfig.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ifconfig.c b/ifconfig.c
index 609e849..024f16d 100644
--- a/ifconfig.c
+++ b/ifconfig.c
@@ -221,16 +221,14 @@ main(int argc, char *argv[])
if (argc == 1) {
print_interface(argv[0]);
} else if (argc == 2) {
- int up;
if (strcmp(argv[1], "up") == 0) {
- up = 1;
+ set_up_down(argv[0], 1);
} else if (strcmp(argv[1], "down") == 0) {
- up = 0;
+ set_up_down(argv[0], 0);
} else {
weprintf("Expecting 'up' or 'down'\n");
usage();
}
- set_up_down(argv[0], up);
} else {
usage();
}