]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
virAsprintf: correctly check return value
authorJán Tomko <jtomko@redhat.com>
Thu, 18 Jul 2013 10:13:46 +0000 (12:13 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 18 Jul 2013 12:05:46 +0000 (14:05 +0200)
commit23e938ee63e07ec61b4184c3a0355ff97af91b2e
treef798b1d76a448c0d35f02f8316d56a4b34153bf0
parent040d996342075ba0a509489066e341ea0280d03b
virAsprintf: correctly check return value

When virAsprintf was changed from a function to a macro
reporting OOM error in dc6f2da, it was documented as returning
0 on success. This is incorrect, it returns the number of bytes
written as asprintf does.

Some of the functions were converted to use virAsprintf's return
value directly, changing the return value on success from 0 to >= 0.

For most of these, this is not a problem, but the change in
virPCIDriverDir breaks PCI passthrough.

The return value check in virhashtest pre-dates virAsprintf OOM
conversion.

vmwareMakePath seems to be unused.
src/qemu/qemu_command.c
src/qemu/qemu_process.c
src/util/virnetdev.c
src/util/virpci.c
src/util/virrandom.c
src/util/virstring.h
src/vmware/vmware_conf.c
tests/virhashtest.c