qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 02/13] qgraph: fix qos_node_contains with option


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH 02/13] qgraph: fix qos_node_contains with options
Date: Tue, 9 Apr 2019 11:27:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 18/03/2019 18.15, Paolo Bonzini wrote:
> Currently, if qos_node_contains was passed options, it would still
> create an edge without any options.  Instead, in that case
> NULL acts as a terminator.
> 
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  tests/libqos/qgraph.c | 12 ++++++++----
>  tests/libqos/qgraph.h | 15 +++++++++------
>  2 files changed, 17 insertions(+), 10 deletions(-)
> 
> diff --git a/tests/libqos/qgraph.c b/tests/libqos/qgraph.c
> index 122efc1b7b..9f738f1849 100644
> --- a/tests/libqos/qgraph.c
> +++ b/tests/libqos/qgraph.c
> @@ -630,15 +630,19 @@ void qos_node_create_driver(const char *name, 
> QOSCreateDriverFunc function)
>  }
>  
>  void qos_node_contains(const char *container, const char *contained,
> -                       ...)
> +                       QOSGraphEdgeOptions *opts, ...)
>  {
>      va_list va;
> -    va_start(va, contained);
> -    QOSGraphEdgeOptions *opts;
>  
> +    if (opts == NULL) {
> +        add_edge(container, contained, QEDGE_CONTAINS, NULL);
> +        return;
> +    }
> +
> +    va_start(va, contained);

As patchew complained - you've got to either replace "contained" with
"opts" here, or switch the order of the options in the prototype.

 Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]