]> git.ipfire.org Git - thirdparty/libvirt.git/commit
maint: improve VIR_ERR_INVALID_SECRET usage
authorEric Blake <eblake@redhat.com>
Sat, 28 Dec 2013 01:12:05 +0000 (18:12 -0700)
committerEric Blake <eblake@redhat.com>
Thu, 9 Jan 2014 20:55:20 +0000 (13:55 -0700)
commit916273eb94071ea723642758133ab420250a9294
treeccb0404f7ebb98ba670dbc9c57a3e1dddf9c7a4e
parent9ec935d56593f2b066e34bb58056368f13f89b13
maint: improve VIR_ERR_INVALID_SECRET usage

While all errors related to invalid secrets appeared to be
consistent, we might as well continue the trend of using a
common macro.  Just as in commit 6e130ddc, the difference
between VIR_IS_SECRET and VIR_IS_CONNECTED_SECRET is moot
(due to reference counting, any valid secret must be tied to
a valid domain).  For now, we don't need virCheckSecretGoto().

* src/datatypes.h (virCheckSecretReturn): New macro.
(VIR_IS_SECRET, VIR_IS_CONNECTED_SECRET): Drop unused macros.
* src/libvirt.c: Use macro throughout.
(virLibSecretError): Drop unused macro.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/datatypes.h
src/libvirt.c