diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-25 12:53:25 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-25 12:53:25 +0000 |
commit | b1bac0dab2e5ea99666fd95ef9f026273142446c (patch) | |
tree | 58a6bd7e7f0bd86b869cfd388a38f9918b5d9a9a /networking | |
parent | a09300a88c68f72bae2a4f25bb0f8620e560832c (diff) |
zcip: simplify code a bit
Diffstat (limited to 'networking')
-rw-r--r-- | networking/zcip.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/networking/zcip.c b/networking/zcip.c index 129155fe5..ef9aa2186 100644 --- a/networking/zcip.c +++ b/networking/zcip.c @@ -177,7 +177,6 @@ int zcip_main(int argc, char **argv) { int state = PROBE; struct ether_addr eth_addr; - const char *why; char *r_opt; unsigned opts; @@ -319,8 +318,6 @@ int zcip_main(int argc, char **argv) VDBG("...wait %d %s nprobes=%u, nclaims=%u\n", timeout_ms, intf, nprobes, nclaims); - // FIXME: do we really receive ALL packets here?? - // if yes, set up filtering to get ARPs only!!! (see arping) switch (safe_poll(fds, 1, timeout_ms)) { default: @@ -447,8 +444,7 @@ int zcip_main(int argc, char **argv) // read ARP packet if (safe_read(sock_fd, &p, sizeof(p)) < 0) { - why = "recv"; - goto bad; + bb_perror_msg_and_die(bb_msg_read_error); } if (p.eth.ether_type != htons(ETHERTYPE_ARP)) continue; @@ -550,7 +546,4 @@ int zcip_main(int argc, char **argv) break; // case 1 (packets arriving) } // switch poll } // while (1) - bad: - bb_perror_msg("%s: %s", intf, why); - return EXIT_FAILURE; } |