summaryrefslogtreecommitdiffhomepage
path: root/networking/traceroute.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/traceroute.c')
-rw-r--r--networking/traceroute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/traceroute.c b/networking/traceroute.c
index ad3ec4eda..c87f7ffc5 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -445,8 +445,8 @@ ifaddrlist(struct IFADDRLIST **ipaddrp)
if (strchr(al->device, ':') != NULL)
continue;
#endif
- if (ioctl(fd, SIOCGIFADDR, (char *)&ifr) < 0)
- bb_perror_msg_and_die("SIOCGIFADDR: %s", al->device);
+ ioctl_or_perror_and_die(fd, SIOCGIFADDR, (char *)&ifr,
+ "SIOCGIFADDR: %s", al->device);
addr_sin = (struct sockaddr_in *)&ifr.ifr_addr;
al->addr = addr_sin->sin_addr.s_addr;