diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-08-19 15:00:06 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-10-13 10:57:40 +0200 |
commit | a3a59271109c621072f8cc30af4a3762cae769fb (patch) | |
tree | d4826e2bf34a6add54515dd124ca8a85bf91057a /net/sntp.c | |
parent | 8fe37b4e2eb20ce789a8b5194b14b2818aae7402 (diff) | |
download | barebox-a3a59271109c621072f8cc30af4a3762cae769fb.tar.gz barebox-a3a59271109c621072f8cc30af4a3762cae769fb.tar.xz |
net: remove switch/case in NetLoop()
Instead of having a big switch/case for every protocol, do
the right things in the individual functions before callong
NetLoop().
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net/sntp.c')
-rw-r--r-- | net/sntp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sntp.c b/net/sntp.c index 3be166a372..8d913dd51e 100644 --- a/net/sntp.c +++ b/net/sntp.c @@ -113,7 +113,9 @@ int do_sntp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) if (NetLoopInit(SNTP) < 0) return 1; - if (NetLoop(SNTP) < 0) { + SntpStart(); + + if (NetLoop() < 0) { printf("SNTP failed: host %s not responding\n", argv[1]); return 1; } |