]> xenbits.xensource.com Git - libvirt.git/commit
Remove VIR_STRNDUP usage that subtracts from a non-NULL pointer
authorJán Tomko <jtomko@redhat.com>
Thu, 24 Oct 2019 17:32:35 +0000 (19:32 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 13 Nov 2019 16:01:38 +0000 (17:01 +0100)
commitfa061c92ec112eb2ed8550b60ebb3fd19cb12154
tree6d8b17917b0546b867bfc9a3bdc053bc67d4a719
parent05e33d4f5451712f1d0be0286d11c4026adc1c37
Remove VIR_STRNDUP usage that subtracts from a non-NULL pointer

Use g_strndup in all the cases where we check upfront whether a pointer
is non-NULL and then use it to calculate the copied length.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/util/virsysinfo.c