[libvirt PATCH 1/9] remote: remove redundant initialization of args variable

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

 



Every member of the args variable will be initialized
explicitly. A few methods had a redundant call to memset
the args which can be removed.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 src/remote/remote_driver.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 43a714c79a..deeabdb24f 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -6000,7 +6000,6 @@ remoteDomainMigrateBegin3(virDomainPtr domain,
 
     remoteDriverLock(priv);
 
-    memset(&args, 0, sizeof(args));
     memset(&ret, 0, sizeof(ret));
 
     make_nonnull_domain(&args.dom, domain);
@@ -6056,7 +6055,6 @@ remoteDomainMigratePrepare3(virConnectPtr dconn,
 
     remoteDriverLock(priv);
 
-    memset(&args, 0, sizeof(args));
     memset(&ret, 0, sizeof(ret));
 
     args.cookie_in.cookie_in_val = (char *)cookiein;
@@ -6125,7 +6123,6 @@ remoteDomainMigratePrepareTunnel3(virConnectPtr dconn,
 
     remoteDriverLock(priv);
 
-    memset(&args, 0, sizeof(args));
     memset(&ret, 0, sizeof(ret));
 
     if (!(netst = virNetClientStreamNew(priv->remoteProgram,
@@ -6200,7 +6197,6 @@ remoteDomainMigratePerform3(virDomainPtr dom,
 
     remoteDriverLock(priv);
 
-    memset(&args, 0, sizeof(args));
     memset(&ret, 0, sizeof(ret));
 
     make_nonnull_domain(&args.dom, dom);
@@ -6260,7 +6256,6 @@ remoteDomainMigrateFinish3(virConnectPtr dconn,
 
     remoteDriverLock(priv);
 
-    memset(&args, 0, sizeof(args));
     memset(&ret, 0, sizeof(ret));
 
     args.cookie_in.cookie_in_val = (char *)cookiein;
@@ -6314,8 +6309,6 @@ remoteDomainMigrateConfirm3(virDomainPtr domain,
 
     remoteDriverLock(priv);
 
-    memset(&args, 0, sizeof(args));
-
     make_nonnull_domain(&args.dom, domain);
     args.cookie_in.cookie_in_len = cookieinlen;
     args.cookie_in.cookie_in_val = (char *) cookiein;
@@ -6908,7 +6901,6 @@ remoteDomainMigrateBegin3Params(virDomainPtr domain,
 
     remoteDriverLock(priv);
 
-    memset(&args, 0, sizeof(args));
     memset(&ret, 0, sizeof(ret));
 
     make_nonnull_domain(&args.dom, domain);
@@ -6971,7 +6963,6 @@ remoteDomainMigratePrepare3Params(virConnectPtr dconn,
 
     remoteDriverLock(priv);
 
-    memset(&args, 0, sizeof(args));
     memset(&ret, 0, sizeof(ret));
 
     if (virTypedParamsSerialize(params, nparams,
@@ -7047,7 +7038,6 @@ remoteDomainMigratePrepareTunnel3Params(virConnectPtr dconn,
 
     remoteDriverLock(priv);
 
-    memset(&args, 0, sizeof(args));
     memset(&ret, 0, sizeof(ret));
 
     args.cookie_in.cookie_in_val = (char *)cookiein;
@@ -7129,7 +7119,6 @@ remoteDomainMigratePerform3Params(virDomainPtr dom,
 
     remoteDriverLock(priv);
 
-    memset(&args, 0, sizeof(args));
     memset(&ret, 0, sizeof(ret));
 
     make_nonnull_domain(&args.dom, dom);
@@ -7195,7 +7184,6 @@ remoteDomainMigrateFinish3Params(virConnectPtr dconn,
 
     remoteDriverLock(priv);
 
-    memset(&args, 0, sizeof(args));
     memset(&ret, 0, sizeof(ret));
 
     args.cookie_in.cookie_in_val = (char *)cookiein;
@@ -7261,8 +7249,6 @@ remoteDomainMigrateConfirm3Params(virDomainPtr domain,
 
     remoteDriverLock(priv);
 
-    memset(&args, 0, sizeof(args));
-
     make_nonnull_domain(&args.dom, domain);
     args.cookie_in.cookie_in_len = cookieinlen;
     args.cookie_in.cookie_in_val = (char *) cookiein;
@@ -7563,8 +7549,6 @@ remoteConnectGetAllDomainStats(virConnectPtr conn,
     virDomainStatsRecordPtr elem = NULL;
     virDomainStatsRecordPtr *tmpret = NULL;
 
-    memset(&args, 0, sizeof(args));
-
     if (ndoms) {
         args.doms.doms_val = g_new0(remote_nonnull_domain, ndoms);
 
-- 
2.38.1




[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