]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virRandomBytes: Fix return value
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 29 May 2018 07:02:57 +0000 (09:02 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 5 Jun 2018 08:31:19 +0000 (10:31 +0200)
commit29592788f1afac8b239f751fd5a861ed4d58b62d
treebf5d177a0495d4fbb21090c276eaf9b84503f0b1
parent0d42fa688b0a10456976a9d23eadfdc47d0f19e6
virRandomBytes: Fix return value

In libvirt when a function wants to return an error code it
should be a negative value. Returning a positive value (or zero)
means success. But virRandomBytes() does not follow this rule.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
src/util/vircrypto.c
src/util/virrandom.c
src/util/viruuid.c
tests/vircryptotest.c