[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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




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 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]