diff options
author | Rob Landley <rob@landley.net> | 2015-01-01 16:59:35 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-01-01 16:59:35 -0600 |
commit | 82effc97f9f2d1c258ea50cb11b130753b8ba805 (patch) | |
tree | f6c584d2b1675a91eb1a016977560ff7148c15a1 /toys/pending/arp.c | |
parent | 5f53d130b1eae9041cc88c0ffb89e2b5823da393 (diff) | |
download | toybox-82effc97f9f2d1c258ea50cb11b130753b8ba805.tar.gz |
Switch a lot of strncpy() calls to xstrncpy().
Diffstat (limited to 'toys/pending/arp.c')
-rw-r--r-- | toys/pending/arp.c | 4 |
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]); |