[PATCH 05/28] domain_conf: make virDomainChr/RNG/Video/VsockDefPostParse() and virDomainNVRAMDefFormat() void
Michal Privoznik
mprivozn at redhat.com
Mon Nov 9 14:37:38 UTC 2020
On 11/6/20 4:32 AM, Matt Coleman wrote:
> These functions always return zero, so they might as well be void.
>
> Signed-off-by: Matt Coleman <matt at datto.com>
> ---
> src/conf/domain_conf.c | 32 +++++++++++++-------------------
> 1 file changed, 13 insertions(+), 19 deletions(-)
>
> @@ -27734,7 +27730,7 @@ virDomainMemballoonDefFormat(virBufferPtr buf,
> return 0;
> }
>
> -static int
> +static void
> virDomainNVRAMDefFormat(virBufferPtr buf,
> virDomainNVRAMDefPtr def,
> unsigned int flags)
> @@ -27746,8 +27742,6 @@ virDomainNVRAMDefFormat(virBufferPtr buf,
>
> virBufferAdjustIndent(buf, -2);
> virBufferAddLit(buf, "</nvram>\n");
> -
> - return 0;
> }
>
In this function there is a check that can return -1; hence this hunk
should not go in. Or the order of patches needs to be fixed since you
are dropping the check in the next patch.
Michal
More information about the libvir-list
mailing list