You need to sign in or sign up before continuing.
  • E
    maint: improve VIR_ERR_INVALID_NETWORK usage · e1761593
    Eric Blake 提交于
    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>
    e1761593
datatypes.h 17.9 KB