diff options
| author | Roy Marples <roy@marples.name> | 2008-03-29 08:40:55 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-03-29 08:40:55 +0000 |
| commit | 453072ef8fa4589a255f797c7fdc64fccb775e5f (patch) | |
| tree | ac97ea86af5eea0b05e1d043be9fce764b05a0cd /arp.c | |
| parent | f57164233dfc48c62679106c8c870bc88119885b (diff) | |
| download | dhcpcd-453072ef8fa4589a255f797c7fdc64fccb775e5f.tar.xz | |
Rework our error handling code a little to save ~5k on x86_64
Diffstat (limited to 'arp.c')
| -rw-r--r-- | arp.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -106,6 +106,8 @@ send_arp(const struct interface *iface, int op, struct in_addr sip, retval = send_packet(iface, ETHERTYPE_ARP, (unsigned char *) arp, arphdr_len(arp)); + if (retval == -1) + logger(LOG_ERR,"send_packet: %s", strerror(errno)); free(arp); return retval; } @@ -150,8 +152,10 @@ arp_claim(struct interface *iface, struct in_addr address) "checking %s is available on attached networks", inet_ntoa(address)); - if (!open_socket(iface, ETHERTYPE_ARP)) + if (!open_socket(iface, ETHERTYPE_ARP)) { + logger (LOG_ERR, "open_socket: %s", strerror(errno)); return -1; + } fds[0].fd = signal_fd(); fds[1].fd = iface->fd; |
