aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-10-11 19:53:10 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-10-11 19:53:10 +0000
commit11c23d7b990eae27357e5a41a97d62b9a214f7db (patch)
treeab544d8f1e0aaa8910f0d032f4ae3ab0927f2f78
parent8add0685733cce787e7256dd7a938b5d44809662 (diff)
downloadbusybox-11c23d7b990eae27357e5a41a97d62b9a214f7db.tar.gz
whitespace/style fix
-rw-r--r--networking/interface.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/networking/interface.c b/networking/interface.c
index 471ac529e..04d12b37e 100644
--- a/networking/interface.c
+++ b/networking/interface.c
@@ -248,7 +248,7 @@ static const struct aftype unspec_aftype = {
.name = "unspec",
.title = "UNSPEC",
.af = AF_UNSPEC,
- .alen = 0,
+ .alen = 0,
.print = UNSPEC_print,
.sprint = UNSPEC_sprint,
};
@@ -405,24 +405,25 @@ static char *get_name(char *name, char *p)
/* Extract <name> from nul-terminated p where p matches
<name>: after leading whitespace.
If match is not made, set name empty and return unchanged p */
- int namestart=0, nameend=0;
+ int namestart = 0, nameend = 0;
+
while (isspace(p[namestart]))
namestart++;
- nameend=namestart;
- while (p[nameend] && p[nameend]!=':' && !isspace(p[nameend]))
+ nameend = namestart;
+ while (p[nameend] && p[nameend] != ':' && !isspace(p[nameend]))
nameend++;
- if (p[nameend]==':') {
- if ((nameend-namestart)<IFNAMSIZ) {
- memcpy(name,&p[namestart],nameend-namestart);
- name[nameend-namestart]='\0';
- p=&p[nameend];
+ if (p[nameend] == ':') {
+ if ((nameend - namestart) < IFNAMSIZ) {
+ memcpy(name, &p[namestart], nameend - namestart);
+ name[nameend - namestart] = '\0';
+ p = &p[nameend];
} else {
/* Interface name too large */
- name[0]='\0';
+ name[0] = '\0';
}
} else {
/* trailing ':' not found - return empty */
- name[0]='\0';
+ name[0] = '\0';
}
return p + 1;
}