net: cosmetic: sntp.* checkpatch compliance

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Joe Hershberger 2012-05-15 08:59:11 +00:00
parent c2faf4f901
commit 6c3234a343
2 changed files with 18 additions and 15 deletions

View File

@ -31,12 +31,14 @@ SntpSend (void)
pkt.vn = NTP_VERSION;
pkt.mode = NTP_MODE_CLIENT;
memcpy ((char *)NetTxPacket + NetEthHdrSize() + IP_HDR_SIZE, (char *)&pkt, pktlen);
memcpy((char *)NetTxPacket + NetEthHdrSize() + IP_HDR_SIZE,
(char *)&pkt, pktlen);
SntpOurPort = 10000 + (get_timer(0) % 4096);
sport = NTP_SERVICE_PORT;
NetSendUDPPacket (NetServerEther, NetNtpServerIP, sport, SntpOurPort, pktlen);
NetSendUDPPacket(NetServerEther, NetNtpServerIP, sport, SntpOurPort,
pktlen);
}
static void
@ -57,7 +59,8 @@ SntpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
debug("%s\n", __func__);
if (dest != SntpOurPort) return;
if (dest != SntpOurPort)
return;
/*
* As the RTC's used in U-Boot sepport second resolution only
@ -83,7 +86,7 @@ SntpStart (void)
NetSetTimeout(SNTP_TIMEOUT, SntpTimeout);
NetSetHandler(SntpHandler);
memset (NetServerEther, 0, 6);
memset(NetServerEther, 0, sizeof(NetServerEther));
SntpSend();
}