X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=networking%2Fzcip.c;h=eb0a7ba417893e2e5757aad2592d32fd52674a0c;hb=7b72fc12000c878e11d5f0b245f83c0d71b29f58;hp=eb3c869ab9f629bb8ded7e14760b43f07507ec92;hpb=473dae080a8a0089d5d619a56d8943d131aa451e;p=oweals%2Fbusybox.git diff --git a/networking/zcip.c b/networking/zcip.c index eb3c869ab..eb0a7ba41 100644 --- a/networking/zcip.c +++ b/networking/zcip.c @@ -23,7 +23,7 @@ // - avoid silent script failures, especially under load... // - link status monitoring (restart on link-up; stop on link-down) -#include "busybox.h" +#include "libbb.h" #include #include #include @@ -114,10 +114,8 @@ static void arp(int fd, struct sockaddr *saddr, int op, memcpy(&p.arp.arp_tpa, &target_ip, sizeof(p.arp.arp_tpa)); // send it - if (sendto(fd, &p, sizeof(p), 0, saddr, sizeof(*saddr)) < 0) { - bb_perror_msg("sendto"); - //return -errno; - } + xsendto(fd, &p, sizeof(p), saddr, sizeof(*saddr)); + // Currently all callers ignore errors, that's why returns are // commented out... //return 0; @@ -151,7 +149,7 @@ static int run(char *argv[3], const char *intf, struct in_addr *ip) /** * Return milliseconds of random delay, up to "secs" seconds. */ -static unsigned ATTRIBUTE_ALWAYS_INLINE ms_rdelay(unsigned secs) +static unsigned ALWAYS_INLINE ms_rdelay(unsigned secs) { return lrand48() % (secs * 1000); }