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

Re: [libvirt] [PATCH 12/20] qemumonitortestutils: Add instrumentation for guest agent testing



On 07/30/2013 07:05 AM, Peter Krempa wrote:
> Add helper functions to open guest agent connections and a handler for
> replying to the "guest-sync" command.
> ---
>  tests/qemumonitortestutils.c | 133 ++++++++++++++++++++++++++++++++++++++++++-
>  tests/qemumonitortestutils.h |   6 ++
>  2 files changed, 137 insertions(+), 2 deletions(-)
> 

> @@ -462,6 +535,24 @@ static qemuMonitorCallbacks qemuMonitorTestCallbacks = {
>  };
> 
> 
> +static void
> +qemuMonitorTestAgentEOFNotify(qemuAgentPtr agent ATTRIBUTE_UNUSED,
> +                              virDomainObjPtr vm ATTRIBUTE_UNUSED)
> +{
> +}
> +
> +static void
> +qemuMonitorTestAgentErrorNotify(qemuAgentPtr agent ATTRIBUTE_UNUSED,
> +                                virDomainObjPtr vm ATTRIBUTE_UNUSED)
> +{
> +}

Since these are the same impl, is it worth simplifying slightly to have:

static void
qemuMonitorTestAgentNofify(...) { }

> +
> +static qemuAgentCallbacks qemuMonitorTestAgentCallbacks = {
> +    .eofNotify = qemuMonitorTestAgentEOFNotify,
> +    .errorNotify = qemuMonitorTestAgentErrorNotify,

and have both callback pointers initialized to the same function
pointer?  But that's a minor space optimization.

>      qemuMonitorTestFree(test);
>      return NULL;
>  }
> 
> +
>  qemuMonitorPtr

Was this newline missed in your earlier patch that sanitized the
whitespace between functions?

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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