On 07/26/2017 05:00 AM, Peter Krempa wrote:
> This new helper loads and returns a file from 'abs_srcdir'. By using
> variable arguments for the function, it's not necessary to format the
> path separately in the test cases.
> ---
>  tests/testutils.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/testutils.h |  2 ++
>  2 files changed, 53 insertions(+)
> 

> +
> +/**
> + * virTestLoadFilePath:
> + * @...: file name components.

Mention that it must end in NULL...

> + *
> + * Constructs the test file path from variable arguments and loads the file.
> + * 'abs_srcdir' is automatically prepended.
> + */
> +char *
> +virTestLoadFilePath(const char *p, ...)

and gcc has an attribute to mark vararg functions that require a NULL
sentinel, to let the compiler enforce correct usage.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to