9
0
Fork 0

net: Coding style changes

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2008-08-20 12:30:13 +02:00
parent d2b2dab075
commit e3f268d52d
1 changed files with 6 additions and 7 deletions

View File

@ -1101,19 +1101,18 @@ IPaddr_t string_to_ip(const char *s)
char *e;
int i;
if (s == NULL)
return(0);
if (!s)
return 0;
for (addr=0, i=0; i<4; ++i) {
for (addr = 0, i = 0; i < 4; ++i) {
ulong val = s ? simple_strtoul(s, &e, 10) : 0;
addr <<= 8;
addr |= (val & 0xFF);
if (s) {
s = (*e) ? e+1 : e;
}
if (s)
s = *e ? e + 1 : e;
}
return (htonl(addr));
return htonl(addr);
}
void VLAN_to_string(ushort x, char *s)