[PATCH v4 01/19] libxl: change type to void libxlPrepareChannel()

Dmitry Frolov posted 19 patches 1 year ago
[PATCH v4 01/19] libxl: change type to void libxlPrepareChannel()
Posted by Dmitry Frolov 1 year ago
libxlPrepareChannel() returns nothing except 0. Changing return
type to void.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
---
 src/libxl/libxl_conf.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 62e1be6672..712b1d627f 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -1937,7 +1937,7 @@ libxlDriverGetDom0MaxmemConf(libxlDriverConfig *cfg,
 }
 
 
-static int
+static void
 libxlPrepareChannel(virDomainChrDef *channel,
                     const char *channelDir,
                     const char *domainName)
@@ -1954,8 +1954,6 @@ libxlPrepareChannel(virDomainChrDef *channel,
 
         channel->source->data.nix.listen = true;
     }
-
-    return 0;
 }
 
 static int
@@ -2011,8 +2009,7 @@ libxlMakeChannelList(const char *channelDir,
         if (l_channels[i]->deviceType != VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL)
             continue;
 
-        if (libxlPrepareChannel(l_channels[i], channelDir, def->name) < 0)
-            goto error;
+        libxlPrepareChannel(l_channels[i], channelDir, def->name);
 
         if (libxlMakeChannel(l_channels[i], &x_channels[nvchannels]) < 0)
             goto error;
-- 
2.34.1
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org