[libvirt] [PATCHv2 14/14] event: make network events easier to use without casts

John Ferlan jferlan at redhat.com
Tue Jan 7 17:15:10 UTC 2014



On 01/06/2014 05:27 PM, Eric Blake wrote:
> While comparing network and domain events, I noticed that the
> test driver had to do a cast in one place and not the other.
> For consistency, we should hide the necessary casting as low
> as possible in the stack, with everything else using saner
> types.
> 
> * src/conf/network_event.h (virNetworkEventStateRegisterID): Alter
> type.
> * src/conf/network_event.c (virNetworkEventStateRegisterID): Hoist
> cast here.
> * src/test/test_driver.c (testConnectNetworkEventRegisterAny):
> Simplify callers.
> * src/remote/remote_driver.c
> (remoteConnectNetworkEventRegisterAny): Likewise.
> * src/network/bridge_driver.c
> (networkConnectNetworkEventRegisterAny): Likewise.
> 
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
>  src/conf/network_event.c    | 5 +++--
>  src/conf/network_event.h    | 3 ++-
>  src/network/bridge_driver.c | 3 +--
>  src/remote/remote_driver.c  | 3 +--
>  src/test/test_driver.c      | 3 +--
>  5 files changed, 8 insertions(+), 9 deletions(-)
> 

ACK

No worries about back compat since added after 1.2...

John




More information about the libvir-list mailing list