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/ping.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/ping.c')
-rw-r--r-- | net/ping.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ping.c b/net/ping.c index 26b7778823..fcafe1e2d9 100644 --- a/net/ping.c +++ b/net/ping.c @@ -100,7 +100,9 @@ int do_ping (cmd_tbl_t *cmdtp, int argc, char *argv[]) if (NetLoopInit(PING) < 0) return 1; - if (NetLoop(PING) < 0) { + PingStart(); + + if (NetLoop() < 0) { printf("ping failed; host %s is not alive\n", argv[1]); return 1; } |