]> git.ipfire.org Git - thirdparty/libvirt.git/commit
maint: improve VIR_ERR_INVALID_INTERFACE usage
authorEric Blake <eblake@redhat.com>
Sat, 28 Dec 2013 01:08:16 +0000 (18:08 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 8 Jan 2014 19:40:06 +0000 (12:40 -0700)
commit459532b4f781b182e4f7459be75449b3906dd645
tree94a336af5b0a21f0871c2c9cd5d5081502afe5f8
parent6d8233fea2c21958c78ef346d3d84679e0e7327d
maint: improve VIR_ERR_INVALID_INTERFACE usage

When checking for a valid interface, we weren't consistent on
whether we reported as VIR_FROM_NONE or VIR_FROM_INTERFACE.
Similar to previous patches, use a common macro to make it nicer.
Furthermore, just as in commit 6e130ddc, the difference between
VIR_IS_INTERFACE and VIR_IS_CONNECTED_INTERFACE is moot (due to
reference counting, any valid interface must be tied to a valid
connection).  For now, we don't need virCheckInterfaceGoto().

* src/datatypes.h (virCheckInterfaceReturn): New macro.
(VIR_IS_INTERFACE, VIR_IS_CONNECTED_INTERFACE): Drop unused
macros.
* src/libvirt.c: Use macro throughout.
(virLibInterfaceError): Drop unused macro.

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