aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-25 11:21:28 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-25 11:21:28 +0000
commitbe15b141e0dddd9f41e464ca98aef1b05b28cf6b (patch)
tree94b26dd8001eef4275e68fe03cf85990d4bfea5a /vl.c
parent9b4c14c35bff99476b0223e87532f8d53a9909c4 (diff)
Replace uses of strncpy (a GNU extension) with Qemu pstrcpy
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5531 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index 1fb474925e..b96735e267 100644
--- a/vl.c
+++ b/vl.c
@@ -4446,7 +4446,7 @@ int tap_alloc(char *dev, size_t dev_size)
syslog(LOG_ERR, "Can't get flags\n");
snprintf (actual_name, 32, "tap%d", ppa);
- strncpy (ifr.lifr_name, actual_name, sizeof (ifr.lifr_name));
+ pstrcpy(ifr.lifr_name, sizeof(ifr.lifr_name), actual_name);
ifr.lifr_ppa = ppa;
/* Assign ppa according to the unit number returned by tun device */
@@ -4489,7 +4489,7 @@ int tap_alloc(char *dev, size_t dev_size)
close (if_fd);
memset(&ifr, 0x0, sizeof(ifr));
- strncpy (ifr.lifr_name, actual_name, sizeof (ifr.lifr_name));
+ pstrcpy(ifr.lifr_name, sizeof(ifr.lifr_name), actual_name);
ifr.lifr_ip_muxid = ip_muxid;
ifr.lifr_arp_muxid = arp_muxid;