diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-10-25 11:21:28 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-10-25 11:21:28 +0000 |
commit | be15b141e0dddd9f41e464ca98aef1b05b28cf6b (patch) | |
tree | 94b26dd8001eef4275e68fe03cf85990d4bfea5a /slirp/udp.c | |
parent | Fix undefined pthread_sigmask warning on OpenBSD (diff) | |
download | qemu-kvm-be15b141e0dddd9f41e464ca98aef1b05b28cf6b.tar.gz qemu-kvm-be15b141e0dddd9f41e464ca98aef1b05b28cf6b.tar.bz2 qemu-kvm-be15b141e0dddd9f41e464ca98aef1b05b28cf6b.zip |
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 'slirp/udp.c')
-rw-r--r-- | slirp/udp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/slirp/udp.c b/slirp/udp.c index 0583d7e97..8030326ad 100644 --- a/slirp/udp.c +++ b/slirp/udp.c @@ -475,14 +475,14 @@ struct cu_header { type = omsg->type; OTOSIN(omsg, ctl_addr)->sin_port = addr.sin_port; OTOSIN(omsg, ctl_addr)->sin_addr = our_addr; - strncpy(omsg->l_name, getlogin(), NAME_SIZE_OLD); + pstrcpy(omsg->l_name, NAME_SIZE_OLD, getlogin()); } else { /* new talk */ omsg = (CTL_MSG_OLD *) buff; nmsg = mtod(m, CTL_MSG *); type = nmsg->type; OTOSIN(nmsg, ctl_addr)->sin_port = addr.sin_port; OTOSIN(nmsg, ctl_addr)->sin_addr = our_addr; - strncpy(nmsg->l_name, getlogin(), NAME_SIZE_OLD); + pstrcpy(nmsg->l_name, NAME_SIZE_OLD, getlogin()); } if (type == LOOK_UP) |