maint: improve VIR_ERR_INVALID_NETWORK usage
When checking for a valid network, we weren't consistent on whether we reported an invalid network or a connection. Similar to previous patches such as commit 6e130ddc, the difference between VIR_IS_NETWORK and VIR_IS_CONNECTED_NETWORK is moot (due to reference counting, any valid network must be tied to a valid connection). Use a common macro to make the error reporting for invalid networks nicer. * src/datatypes.h (virCheckNetworkReturn, virCheckNetworkGoto): New macros. (VIR_IS_NETWORK, VIR_IS_CONNECTED_NETWORK): Drop unused macros. * src/libvirt.c: Use macro throughout. (virLibNetworkError): Drop unused macro. Signed-off-by: NEric Blake <eblake@redhat.com>
Showing
想要评论请 注册 或 登录