#endif
if (eth_init(bd) < 0) {
eth_halt();
- return(-1);
+ return -1;
}
restart:
case 1:
/* network not configured */
eth_halt();
- return (-1);
+ return -1;
#ifdef CONFIG_NET_MULTI
case 2:
if (ctrlc()) {
eth_halt();
puts("\nAbort\n");
- return (-1);
+ return -1;
}
ArpTimeoutCheck();
return NetBootFileXferSize;
case NETLOOP_FAIL:
- return (-1);
+ return -1;
}
}
}
case PING:
if (NetPingIP == 0) {
puts("*** ERROR: ping address not given\n");
- return (1);
+ return 1;
}
goto common;
#endif
case SNTP:
if (NetNtpServerIP == 0) {
puts("*** ERROR: NTP server address not given\n");
- return (1);
+ return 1;
}
goto common;
#endif
case TFTP:
if (NetServerIP == 0) {
puts("*** ERROR: `serverip' not set\n");
- return (1);
+ return 1;
}
#if defined(CONFIG_CMD_PING) || defined(CONFIG_CMD_SNTP) || \
defined(CONFIG_CMD_DNS)
case NETCONS:
if (NetOurIP == 0) {
puts("*** ERROR: `ipaddr' not set\n");
- return (1);
+ return 1;
}
/* Fall through */
switch (num) {
case -1:
puts("*** ERROR: No ethernet found.\n");
- return (1);
+ return 1;
case 0:
puts("*** ERROR: `ethaddr' not set\n");
break;
}
NetStartAgain();
- return (2);
+ return 2;
#else
puts("*** ERROR: `ethaddr' not set\n");
- return (1);
+ return 1;
#endif
}
/* Fall through */
default:
- return (0);
+ return 0;
}
- return (0); /* OK */
+ return 0; /* OK */
}
/**********************************************************************/
xsum += *p++;
xsum = (xsum & 0xffff) + (xsum >> 16);
xsum = (xsum & 0xffff) + (xsum >> 16);
- return (xsum & 0xffff);
+ return xsum & 0xffff;
}
int
ushort getenv_VLAN(char *var)
{
- return (string_to_VLAN(getenv(var)));
+ return string_to_VLAN(getenv(var));
}