vscsi: avoid unwarranted strncpy
authorJim Meyering <meyering@redhat.com>
Thu, 4 Oct 2012 11:09:57 +0000 (13:09 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 5 Oct 2012 12:58:37 +0000 (07:58 -0500)
commit9d055d8ac83cfd590263e8862ff683f705dfdf56
tree2e4814f2a137d7f863c17f2d493f4895cc5f6e67
parent9238c2099d37748a4e2cbbe709ed1ebffa6f3c8b
vscsi: avoid unwarranted strncpy

Don't use strncpy when the source string is known to fit
in the destination buffer.  Use equivalent memcpy.
We could even use strcpy, here, but some static analyzers
warn about that, so don't add new uses.

Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/spapr_vscsi.c