net/net.c: cosmetic: variable initializations
This removes the following checkpatch errors: - ERROR: do not initialise globals to 0 or NULL - ERROR: spaces required around that '=' (ctx:VxV) - ERROR: that open brace { should be on the previous line Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it> Cc: Wolfgang Denk <wd@denx.de> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
3e38e429ff
commit
c586ce6e01
40
net/net.c
40
net/net.c
@ -117,23 +117,23 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||||||
/** BOOTP EXTENTIONS **/
|
/** BOOTP EXTENTIONS **/
|
||||||
|
|
||||||
/* Our subnet mask (0=unknown) */
|
/* Our subnet mask (0=unknown) */
|
||||||
IPaddr_t NetOurSubnetMask=0;
|
IPaddr_t NetOurSubnetMask;
|
||||||
/* Our gateways IP address */
|
/* Our gateways IP address */
|
||||||
IPaddr_t NetOurGatewayIP=0;
|
IPaddr_t NetOurGatewayIP;
|
||||||
/* Our DNS IP address */
|
/* Our DNS IP address */
|
||||||
IPaddr_t NetOurDNSIP=0;
|
IPaddr_t NetOurDNSIP;
|
||||||
#if defined(CONFIG_BOOTP_DNS2)
|
#if defined(CONFIG_BOOTP_DNS2)
|
||||||
/* Our 2nd DNS IP address */
|
/* Our 2nd DNS IP address */
|
||||||
IPaddr_t NetOurDNS2IP=0;
|
IPaddr_t NetOurDNS2IP;
|
||||||
#endif
|
#endif
|
||||||
/* Our NIS domain */
|
/* Our NIS domain */
|
||||||
char NetOurNISDomain[32]={0,};
|
char NetOurNISDomain[32] = {0,};
|
||||||
/* Our hostname */
|
/* Our hostname */
|
||||||
char NetOurHostName[32]={0,};
|
char NetOurHostName[32] = {0,};
|
||||||
/* Our bootpath */
|
/* Our bootpath */
|
||||||
char NetOurRootPath[64]={0,};
|
char NetOurRootPath[64] = {0,};
|
||||||
/* Our bootfile size in blocks */
|
/* Our bootfile size in blocks */
|
||||||
ushort NetBootFileSize=0;
|
ushort NetBootFileSize;
|
||||||
|
|
||||||
#ifdef CONFIG_MCAST_TFTP /* Multicast TFTP */
|
#ifdef CONFIG_MCAST_TFTP /* Multicast TFTP */
|
||||||
IPaddr_t Mcast_addr;
|
IPaddr_t Mcast_addr;
|
||||||
@ -146,8 +146,7 @@ ulong NetBootFileXferSize;
|
|||||||
/* Our ethernet address */
|
/* Our ethernet address */
|
||||||
uchar NetOurEther[6];
|
uchar NetOurEther[6];
|
||||||
/* Boot server enet address */
|
/* Boot server enet address */
|
||||||
uchar NetServerEther[6] =
|
uchar NetServerEther[6];
|
||||||
{ 0, 0, 0, 0, 0, 0 };
|
|
||||||
/* Our IP addr (0 = unknown) */
|
/* Our IP addr (0 = unknown) */
|
||||||
IPaddr_t NetOurIP;
|
IPaddr_t NetOurIP;
|
||||||
/* Server IP addr (0 = unknown) */
|
/* Server IP addr (0 = unknown) */
|
||||||
@ -159,27 +158,24 @@ int NetRxPacketLen;
|
|||||||
/* IP packet ID */
|
/* IP packet ID */
|
||||||
unsigned NetIPID;
|
unsigned NetIPID;
|
||||||
/* Ethernet bcast address */
|
/* Ethernet bcast address */
|
||||||
uchar NetBcastAddr[6] =
|
uchar NetBcastAddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
||||||
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
uchar NetEtherNullAddr[6];
|
||||||
uchar NetEtherNullAddr[6] =
|
|
||||||
{ 0, 0, 0, 0, 0, 0 };
|
|
||||||
#ifdef CONFIG_API
|
#ifdef CONFIG_API
|
||||||
void (*push_packet)(volatile void *, int len) = 0;
|
void (*push_packet)(volatile void *, int len) = 0;
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_CMD_CDP)
|
#if defined(CONFIG_CMD_CDP)
|
||||||
/* Ethernet bcast address */
|
/* Ethernet bcast address */
|
||||||
uchar NetCDPAddr[6] =
|
uchar NetCDPAddr[6] = { 0x01, 0x00, 0x0c, 0xcc, 0xcc, 0xcc };
|
||||||
{ 0x01, 0x00, 0x0c, 0xcc, 0xcc, 0xcc };
|
|
||||||
#endif
|
#endif
|
||||||
/* Network loop state */
|
/* Network loop state */
|
||||||
int NetState;
|
int NetState;
|
||||||
#ifdef CONFIG_NET_MULTI
|
#ifdef CONFIG_NET_MULTI
|
||||||
/* Tried all network devices */
|
/* Tried all network devices */
|
||||||
int NetRestartWrap = 0;
|
int NetRestartWrap;
|
||||||
/* Network loop restarted */
|
/* Network loop restarted */
|
||||||
static int NetRestarted = 0;
|
static int NetRestarted;
|
||||||
/* At least one device configured */
|
/* At least one device configured */
|
||||||
static int NetDevExists = 0;
|
static int NetDevExists;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* XXX in both little & big endian machines 0xFFFF == ntohs(-1) */
|
/* XXX in both little & big endian machines 0xFFFF == ntohs(-1) */
|
||||||
@ -206,7 +202,7 @@ static void CDPStart(void);
|
|||||||
/* NTP server IP address */
|
/* NTP server IP address */
|
||||||
IPaddr_t NetNtpServerIP;
|
IPaddr_t NetNtpServerIP;
|
||||||
/* offset time from UTC */
|
/* offset time from UTC */
|
||||||
int NetTimeOffset=0;
|
int NetTimeOffset;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NETCONSOLE
|
#ifdef CONFIG_NETCONSOLE
|
||||||
@ -228,7 +224,7 @@ static ulong timeStart;
|
|||||||
/* Current timeout value */
|
/* Current timeout value */
|
||||||
static ulong timeDelta;
|
static ulong timeDelta;
|
||||||
/* THE transmit packet */
|
/* THE transmit packet */
|
||||||
volatile uchar *NetTxPacket = 0;
|
volatile uchar *NetTxPacket;
|
||||||
|
|
||||||
static int net_check_prereq (proto_t protocol);
|
static int net_check_prereq (proto_t protocol);
|
||||||
|
|
||||||
@ -319,7 +315,7 @@ void ArpTimeoutCheck(void)
|
|||||||
static void
|
static void
|
||||||
NetInitLoop(proto_t protocol)
|
NetInitLoop(proto_t protocol)
|
||||||
{
|
{
|
||||||
static int env_changed_id = 0;
|
static int env_changed_id;
|
||||||
bd_t *bd = gd->bd;
|
bd_t *bd = gd->bd;
|
||||||
int env_id = get_env_id ();
|
int env_id = get_env_id ();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user