Add qemu_strndup: qemu_strdup with length limit.
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 9 Nov 2008 00:28:40 +0000 (00:28 +0000)
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 9 Nov 2008 00:28:40 +0000 (00:28 +0000)
commitf3b9936baf3837f459152081be2e50a69abaea19
treeeaa7265c8e10149b0fe4a7a3a8c995b1026cd1ae
parent5d3cb803f6fbf19654b056aa2e7979fe600a2bb6
Add qemu_strndup: qemu_strdup with length limit.

Also optimise qemu_strdup by using memcpy - using pstrcpy is usually
suboptimal.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5653 c046a42c-6fe2-441c-8c8c-71466251a162
hw/bt-hci.c
qemu-common.h
qemu-malloc.c