[libvirt] [PATCH v2 3/3] testutils: Explicitly name virTestCompare*() arguments

Andrea Bolognani abologna at redhat.com
Wed Feb 20 13:49:54 UTC 2019


On Wed, 2019-02-20 at 14:20 +0100, Michal Privoznik wrote:
[...]
>  /*
> - * @param strcontent: String input content
> - * @param filename: File to compare strcontent against
> + * @param actual: String input content
> + * @param filename: File to compare @actual against
>   *
> - * If @strcontent is NULL, it's treated as an empty string.
> + * If @actual is NULL, it's treated as an empty string.
>   */
>  int
> -virTestCompareToFile(const char *strcontent,
> +virTestCompareToFile(const char *actual,
>                       const char *filename)

Agree with John that 'actual' being the first argument rather
than the second one here is pretty weird, but we can take care of
that in a follow-up commit. This change is already a massive
improvement over the status quo :)

[...]
> @@ -814,36 +814,28 @@ virTestCompareToFile(const char *strcontent,
>      return ret;
>  }
>  
> -/*
> - * @param content: Input content
> - * @param src: Source to compare @content against
> - */

Not sure why you removed the comments for this function and
virTestCompareToString() rather than just updating them as you've
done for the one above, but with the new names for the arguments
it's pretty much self-explanatory so I'm totally fine with it.

Reviewed-by: Andrea Bolognani <abologna at redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list