aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/arp.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/pending/arp.c')
-rw-r--r--toys/pending/arp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/pending/arp.c b/toys/pending/arp.c
index 1153ebc1..e725112b 100644
--- a/toys/pending/arp.c
+++ b/toys/pending/arp.c
@@ -175,7 +175,7 @@ static int set_entry(void)
flags = ATF_PERM | ATF_COM;
if (toys.optargs[2]) check_flags(&flags, (toys.optargs+2));
req.arp_flags = flags;
- strncpy(req.arp_dev, TT.device, sizeof(req.arp_dev));
+ xstrncpy(req.arp_dev, TT.device, sizeof(req.arp_dev));
xioctl(TT.sockfd, SIOCSARP, &req);
if (toys.optflags & FLAG_v) xprintf("Entry set for %s\n", toys.optargs[0]);
@@ -204,7 +204,7 @@ static int delete_entry(void)
flags = ATF_PERM;
if (toys.optargs[1]) check_flags(&flags, (toys.optargs+1));
req.arp_flags = flags;
- strncpy(req.arp_dev, TT.device, sizeof(req.arp_dev));
+ xstrncpy(req.arp_dev, TT.device, sizeof(req.arp_dev));
xioctl(TT.sockfd, SIOCDARP, &req);
if (toys.optflags & FLAG_v) xprintf("Delete entry for %s\n", toys.optargs[0]);