[libvirt] [PATCH] conf: nodedev: Remove inverted match logic

Jiri Denemark jdenemar at redhat.com
Wed Mar 16 12:18:43 UTC 2016


On Wed, Mar 16, 2016 at 13:09:39 +0100, Andrea Bolognani wrote:
> Commit c1276177f832 simplified the match logic; this commit
> gets rid of the inverted logic to make the code even more
> straightforward.
> ---
>  src/conf/node_device_conf.c | 28 ++++++++++++++--------------
>  1 file changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
> index 0c9c348..b9b9dfa 100644
> --- a/src/conf/node_device_conf.c
> +++ b/src/conf/node_device_conf.c
> @@ -1806,22 +1806,22 @@ virNodeDeviceMatch(virNodeDeviceObjPtr devobj,
>  {
>      /* filter by cap type */
>      if (flags & VIR_CONNECT_LIST_NODE_DEVICES_FILTERS_CAP) {
...
>      }
>  
> -    return true;
> +    return false;
>  }

Looks like your patch changes the return value in case
VIR_CONNECT_LIST_NODE_DEVICES_FILTERS_CAP flag is not set

Jirka




More information about the libvir-list mailing list