]> git.proxmox.com Git - qemu.git/commit - ui/vnc-auth-sasl.c
ui/vnc: simplify and avoid strncpy
authorJim Meyering <meyering@redhat.com>
Thu, 4 Oct 2012 11:09:54 +0000 (13:09 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 5 Oct 2012 12:58:37 +0000 (07:58 -0500)
commit5847d9e1399d3497be8eeca6f3a20a18a40b114b
tree0a94b172f4ab208649213b64da95264041337014
parent900cfbcac6fa689b5fc8d53b60c3ed39047b8a33
ui/vnc: simplify and avoid strncpy

Don't bother with strncpy.  There's no need for its zero-fill.
Use g_strndup in place of g_malloc+strncpy+NUL-terminate.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ui/vnc-auth-sasl.c