aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-01-13 15:43:28 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-01-13 15:43:28 +0000
commitc44c21060e47a50090206b23ff4de8fe13e8e521 (patch)
treeb55f7227f470e1ae87e24a89f0ce37aaae257961
parentce34cccf28d3b46defbc048f8748d0c870ac3178 (diff)
downloadbusybox-c44c21060e47a50090206b23ff4de8fe13e8e521.tar.gz
- save four bytes by manually hoisting the br assignment
-rw-r--r--networking/brctl.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/networking/brctl.c b/networking/brctl.c
index 21d528f91..5255a552f 100644
--- a/networking/brctl.c
+++ b/networking/brctl.c
@@ -35,6 +35,7 @@ int brctl_main(int argc, char **argv)
USE_FEATURE_BRCTL_SHOW(, ARG_show) };
smalluint key;
static char info[] = BRCTL_VERBOSE("%s ")"bridge %s\0 iface %s";
+ char *br;
argv++;
while (*argv) {
@@ -51,10 +52,9 @@ int brctl_main(int argc, char **argv)
#endif
BRCTL_VERBOSE(op = (char*)((key % 2) ? "add" : "del");)
fd = xsocket(AF_INET, SOCK_STREAM, 0);
- if (key < 3) {/* addbr or delbr */
- char *br;
+ br = *(argv++);
- br = *(argv++);
+ if (key < 3) { /* addbr or delbr */
if (ioctl(fd, key == ARG_addbr ? SIOCBRADDBR : SIOCBRDELBR, br) < 0)
{
info[9 BRCTL_VERBOSE(+3)] = '\0';
@@ -63,9 +63,8 @@ int brctl_main(int argc, char **argv)
}
if (key > 2) { /* addif or delif */
struct ifreq ifr;
- char *br, *brif;
+ char *brif;
- br = *(argv++);
if (!*argv)
bb_show_usage();
brif = *(argv++);