net: Coding style changes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
d2b2dab075
commit
e3f268d52d
13
net/net.c
13
net/net.c
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue