Re: [PATCH 05/28] domain_conf: make virDomainChr/RNG/Video/VsockDefPostParse() and virDomainNVRAMDefFormat() void

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

 



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@xxxxxxxxx>
---
  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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux