summaryrefslogtreecommitdiff
path: root/networking/ifupdown.c
diff options
context:
space:
mode:
authorDenys Vlasenko2012-11-09 17:16:40 +0100
committerDenys Vlasenko2012-11-09 17:16:40 +0100
commit3f21044f20ef304309651bbdef8b275475f03a28 (patch)
tree8efd25f84669653935b53d3175a04bc5203e3aba /networking/ifupdown.c
parenta803bfa0f06c10d8581bd457b9ba937466c73588 (diff)
downloadbusybox-3f21044f20ef304309651bbdef8b275475f03a28.zip
busybox-3f21044f20ef304309651bbdef8b275475f03a28.tar.gz
ifupdown: code shrink
function old new delta execute 571 548 -23 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/ifupdown.c')
-rw-r--r--networking/ifupdown.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 650cc70..8180482 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -230,7 +230,7 @@ static int count_netmask_bits(const char *dotted_quad)
static char *parse(const char *command, struct interface_defn_t *ifd)
{
size_t old_pos[MAX_OPT_DEPTH] = { 0 };
- int okay[MAX_OPT_DEPTH] = { 1 };
+ smallint okay[MAX_OPT_DEPTH] = { 1 };
int opt_depth = 1;
char *result = NULL;
@@ -241,13 +241,10 @@ static char *parse(const char *command, struct interface_defn_t *ifd)
command++;
break;
case '\\':
- if (command[1]) {
- addstr(&result, command + 1, 1);
- command += 2;
- } else {
- addstr(&result, command, 1);
+ if (command[1])
command++;
- }
+ addstr(&result, command, 1);
+ command++;
break;
case '[':
if (command[1] == '[' && opt_depth < MAX_OPT_DEPTH) {