]> xenbits.xensource.com Git - libvirt.git/commit
util: pidfile: Sanitize return values of virPidFileReadIfAlive
authorPeter Krempa <pkrempa@redhat.com>
Wed, 13 Nov 2019 11:57:01 +0000 (12:57 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 14 Nov 2019 11:42:09 +0000 (12:42 +0100)
commitb13e45911d24c9e46dab67a3f95f85c45918e1b9
treee9191b91a63c116b762969263419e21e2d71fcc9
parent19cfd7e59855a236261be857f3a57325a909f7ca
util: pidfile: Sanitize return values of virPidFileReadIfAlive

Return -1 on failure rather than -errno since none of the callers
actually cares about the return value. This specifically fixes returns
of -ENOMEM in cases of bad usage, which would report wrong error
anyways.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virpidfile.c