net/net.c: cosmetic: parentheses not required for return
This removes the following checkpatch issue: - ERROR: return is not a function, parentheses are not required Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it> Cc: Wolfgang Denk <wd@denx.de> Cc: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
parent
6b147d1139
commit
92895de978
30
net/net.c
30
net/net.c
|
@ -383,7 +383,7 @@ NetLoop(proto_t protocol)
|
||||||
#endif
|
#endif
|
||||||
if (eth_init(bd) < 0) {
|
if (eth_init(bd) < 0) {
|
||||||
eth_halt();
|
eth_halt();
|
||||||
return(-1);
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
restart:
|
restart:
|
||||||
|
@ -406,7 +406,7 @@ restart:
|
||||||
case 1:
|
case 1:
|
||||||
/* network not configured */
|
/* network not configured */
|
||||||
eth_halt();
|
eth_halt();
|
||||||
return (-1);
|
return -1;
|
||||||
|
|
||||||
#ifdef CONFIG_NET_MULTI
|
#ifdef CONFIG_NET_MULTI
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -521,7 +521,7 @@ restart:
|
||||||
if (ctrlc()) {
|
if (ctrlc()) {
|
||||||
eth_halt();
|
eth_halt();
|
||||||
puts("\nAbort\n");
|
puts("\nAbort\n");
|
||||||
return (-1);
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ArpTimeoutCheck();
|
ArpTimeoutCheck();
|
||||||
|
@ -578,7 +578,7 @@ restart:
|
||||||
return NetBootFileXferSize;
|
return NetBootFileXferSize;
|
||||||
|
|
||||||
case NETLOOP_FAIL:
|
case NETLOOP_FAIL:
|
||||||
return (-1);
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1756,7 +1756,7 @@ static int net_check_prereq(proto_t protocol)
|
||||||
case PING:
|
case PING:
|
||||||
if (NetPingIP == 0) {
|
if (NetPingIP == 0) {
|
||||||
puts("*** ERROR: ping address not given\n");
|
puts("*** ERROR: ping address not given\n");
|
||||||
return (1);
|
return 1;
|
||||||
}
|
}
|
||||||
goto common;
|
goto common;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1764,7 +1764,7 @@ static int net_check_prereq(proto_t protocol)
|
||||||
case SNTP:
|
case SNTP:
|
||||||
if (NetNtpServerIP == 0) {
|
if (NetNtpServerIP == 0) {
|
||||||
puts("*** ERROR: NTP server address not given\n");
|
puts("*** ERROR: NTP server address not given\n");
|
||||||
return (1);
|
return 1;
|
||||||
}
|
}
|
||||||
goto common;
|
goto common;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1782,7 +1782,7 @@ static int net_check_prereq(proto_t protocol)
|
||||||
case TFTP:
|
case TFTP:
|
||||||
if (NetServerIP == 0) {
|
if (NetServerIP == 0) {
|
||||||
puts("*** ERROR: `serverip' not set\n");
|
puts("*** ERROR: `serverip' not set\n");
|
||||||
return (1);
|
return 1;
|
||||||
}
|
}
|
||||||
#if defined(CONFIG_CMD_PING) || defined(CONFIG_CMD_SNTP) || \
|
#if defined(CONFIG_CMD_PING) || defined(CONFIG_CMD_SNTP) || \
|
||||||
defined(CONFIG_CMD_DNS)
|
defined(CONFIG_CMD_DNS)
|
||||||
|
@ -1793,7 +1793,7 @@ common:
|
||||||
case NETCONS:
|
case NETCONS:
|
||||||
if (NetOurIP == 0) {
|
if (NetOurIP == 0) {
|
||||||
puts("*** ERROR: `ipaddr' not set\n");
|
puts("*** ERROR: `ipaddr' not set\n");
|
||||||
return (1);
|
return 1;
|
||||||
}
|
}
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
|
|
||||||
|
@ -1811,7 +1811,7 @@ common:
|
||||||
switch (num) {
|
switch (num) {
|
||||||
case -1:
|
case -1:
|
||||||
puts("*** ERROR: No ethernet found.\n");
|
puts("*** ERROR: No ethernet found.\n");
|
||||||
return (1);
|
return 1;
|
||||||
case 0:
|
case 0:
|
||||||
puts("*** ERROR: `ethaddr' not set\n");
|
puts("*** ERROR: `ethaddr' not set\n");
|
||||||
break;
|
break;
|
||||||
|
@ -1822,17 +1822,17 @@ common:
|
||||||
}
|
}
|
||||||
|
|
||||||
NetStartAgain();
|
NetStartAgain();
|
||||||
return (2);
|
return 2;
|
||||||
#else
|
#else
|
||||||
puts("*** ERROR: `ethaddr' not set\n");
|
puts("*** ERROR: `ethaddr' not set\n");
|
||||||
return (1);
|
return 1;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
default:
|
default:
|
||||||
return (0);
|
return 0;
|
||||||
}
|
}
|
||||||
return (0); /* OK */
|
return 0; /* OK */
|
||||||
}
|
}
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
||||||
|
@ -1854,7 +1854,7 @@ NetCksum(uchar *ptr, int len)
|
||||||
xsum += *p++;
|
xsum += *p++;
|
||||||
xsum = (xsum & 0xffff) + (xsum >> 16);
|
xsum = (xsum & 0xffff) + (xsum >> 16);
|
||||||
xsum = (xsum & 0xffff) + (xsum >> 16);
|
xsum = (xsum & 0xffff) + (xsum >> 16);
|
||||||
return (xsum & 0xffff);
|
return xsum & 0xffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -1998,5 +1998,5 @@ ushort string_to_VLAN(const char *s)
|
||||||
|
|
||||||
ushort getenv_VLAN(char *var)
|
ushort getenv_VLAN(char *var)
|
||||||
{
|
{
|
||||||
return (string_to_VLAN(getenv(var)));
|
return string_to_VLAN(getenv(var));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue