GObject initialization ensures objects and their private data are 0's.
---
 libvirt-gconfig/libvirt-gconfig-capabilities.c    |    6 +-----
 libvirt-gconfig/libvirt-gconfig-domain-snapshot.c |    6 +-----
 libvirt-gconfig/libvirt-gconfig-domain.c          |    6 +-----
 libvirt-gconfig/libvirt-gconfig-interface.c       |    6 +-----
 libvirt-gconfig/libvirt-gconfig-network-filter.c  |    6 +-----
 libvirt-gconfig/libvirt-gconfig-network.c         |    6 +-----
 libvirt-gconfig/libvirt-gconfig-node-device.c     |    6 +-----
 libvirt-gconfig/libvirt-gconfig-object.c          |    6 +-----
 libvirt-gconfig/libvirt-gconfig-secret.c          |    6 +-----
 libvirt-gconfig/libvirt-gconfig-storage-pool.c    |    6 +-----
 libvirt-gconfig/libvirt-gconfig-storage-vol.c     |    6 +-----
 libvirt-gobject/libvirt-gobject-connection.c      |    2 --
 libvirt-gobject/libvirt-gobject-domain-snapshot.c |    6 +-----
 libvirt-gobject/libvirt-gobject-domain.c          |    6 +-----
 libvirt-gobject/libvirt-gobject-interface.c       |    6 +-----
 libvirt-gobject/libvirt-gobject-manager.c         |    2 --
 libvirt-gobject/libvirt-gobject-network-filter.c  |    6 +-----
 libvirt-gobject/libvirt-gobject-network.c         |    6 +-----
 libvirt-gobject/libvirt-gobject-node-device.c     |    6 +-----
 libvirt-gobject/libvirt-gobject-secret.c          |    6 +-----
 libvirt-gobject/libvirt-gobject-storage-pool.c    |    4 +---
 libvirt-gobject/libvirt-gobject-storage-vol.c     |    6 +-----
 22 files changed, 20 insertions(+), 102 deletions(-)

diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities.c 
b/libvirt-gconfig/libvirt-gconfig-capabilities.c
index 75edc2d..703673d 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities.c
@@ -51,13 +51,9 @@ static void 
gvir_config_capabilities_class_init(GVirConfigCapabilitiesClass *kla
 
 static void gvir_config_capabilities_init(GVirConfigCapabilities *conn)
 {
-    GVirConfigCapabilitiesPrivate *priv;
-
     DEBUG("Init GVirConfigCapabilities=%p", conn);
 
-    priv = conn->priv = GVIR_CONFIG_CAPABILITIES_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_CONFIG_CAPABILITIES_GET_PRIVATE(conn);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-snapshot.c 
b/libvirt-gconfig/libvirt-gconfig-domain-snapshot.c
index f6151fe..970de87 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-snapshot.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-snapshot.c
@@ -51,13 +51,9 @@ static void 
gvir_config_domain_snapshot_class_init(GVirConfigDomainSnapshotClass
 
 static void gvir_config_domain_snapshot_init(GVirConfigDomainSnapshot *conn)
 {
-    GVirConfigDomainSnapshotPrivate *priv;
-
     DEBUG("Init GVirConfigDomainSnapshot=%p", conn);
 
-    priv = conn->priv = GVIR_CONFIG_DOMAIN_SNAPSHOT_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_CONFIG_DOMAIN_SNAPSHOT_GET_PRIVATE(conn);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c 
b/libvirt-gconfig/libvirt-gconfig-domain.c
index 77115ba..2d5aeb5 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain.c
@@ -134,13 +134,9 @@ static void 
gvir_config_domain_class_init(GVirConfigDomainClass *klass)
 
 static void gvir_config_domain_init(GVirConfigDomain *conn)
 {
-    GVirConfigDomainPrivate *priv;
-
     DEBUG("Init GVirConfigDomain=%p", conn);
 
-    priv = conn->priv = GVIR_CONFIG_DOMAIN_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_CONFIG_DOMAIN_GET_PRIVATE(conn);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-interface.c 
b/libvirt-gconfig/libvirt-gconfig-interface.c
index f3f5d39..631dc3b 100644
--- a/libvirt-gconfig/libvirt-gconfig-interface.c
+++ b/libvirt-gconfig/libvirt-gconfig-interface.c
@@ -51,13 +51,9 @@ static void 
gvir_config_interface_class_init(GVirConfigInterfaceClass *klass)
 
 static void gvir_config_interface_init(GVirConfigInterface *conn)
 {
-    GVirConfigInterfacePrivate *priv;
-
     DEBUG("Init GVirConfigInterface=%p", conn);
 
-    priv = conn->priv = GVIR_CONFIG_INTERFACE_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_CONFIG_INTERFACE_GET_PRIVATE(conn);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-network-filter.c 
b/libvirt-gconfig/libvirt-gconfig-network-filter.c
index f1c99df..4138fc1 100644
--- a/libvirt-gconfig/libvirt-gconfig-network-filter.c
+++ b/libvirt-gconfig/libvirt-gconfig-network-filter.c
@@ -51,13 +51,9 @@ static void 
gvir_config_network_filter_class_init(GVirConfigNetworkFilterClass *
 
 static void gvir_config_network_filter_init(GVirConfigNetworkFilter *conn)
 {
-    GVirConfigNetworkFilterPrivate *priv;
-
     DEBUG("Init GVirConfigNetworkFilter=%p", conn);
 
-    priv = conn->priv = GVIR_CONFIG_NETWORK_FILTER_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_CONFIG_NETWORK_FILTER_GET_PRIVATE(conn);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-network.c 
b/libvirt-gconfig/libvirt-gconfig-network.c
index cdbc4ad..1bc1077 100644
--- a/libvirt-gconfig/libvirt-gconfig-network.c
+++ b/libvirt-gconfig/libvirt-gconfig-network.c
@@ -51,13 +51,9 @@ static void 
gvir_config_network_class_init(GVirConfigNetworkClass *klass)
 
 static void gvir_config_network_init(GVirConfigNetwork *conn)
 {
-    GVirConfigNetworkPrivate *priv;
-
     DEBUG("Init GVirConfigNetwork=%p", conn);
 
-    priv = conn->priv = GVIR_CONFIG_NETWORK_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_CONFIG_NETWORK_GET_PRIVATE(conn);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-node-device.c 
b/libvirt-gconfig/libvirt-gconfig-node-device.c
index 0dc4cc6..c43346c 100644
--- a/libvirt-gconfig/libvirt-gconfig-node-device.c
+++ b/libvirt-gconfig/libvirt-gconfig-node-device.c
@@ -51,13 +51,9 @@ static void 
gvir_config_node_device_class_init(GVirConfigNodeDeviceClass *klass)
 
 static void gvir_config_node_device_init(GVirConfigNodeDevice *conn)
 {
-    GVirConfigNodeDevicePrivate *priv;
-
     DEBUG("Init GVirConfigNodeDevice=%p", conn);
 
-    priv = conn->priv = GVIR_CONFIG_NODE_DEVICE_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_CONFIG_NODE_DEVICE_GET_PRIVATE(conn);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-object.c 
b/libvirt-gconfig/libvirt-gconfig-object.c
index fbdbedd..66b458a 100644
--- a/libvirt-gconfig/libvirt-gconfig-object.c
+++ b/libvirt-gconfig/libvirt-gconfig-object.c
@@ -177,13 +177,9 @@ static void 
gvir_config_object_class_init(GVirConfigObjectClass *klass)
 
 static void gvir_config_object_init(GVirConfigObject *conn)
 {
-    GVirConfigObjectPrivate *priv;
-
     DEBUG("Init GVirConfigObject=%p", conn);
 
-    priv = conn->priv = GVIR_CONFIG_OBJECT_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_CONFIG_OBJECT_GET_PRIVATE(conn);
 }
 
 void gvir_config_object_validate(GVirConfigObject *config,
diff --git a/libvirt-gconfig/libvirt-gconfig-secret.c 
b/libvirt-gconfig/libvirt-gconfig-secret.c
index 013dfb4..56a6256 100644
--- a/libvirt-gconfig/libvirt-gconfig-secret.c
+++ b/libvirt-gconfig/libvirt-gconfig-secret.c
@@ -51,13 +51,9 @@ static void 
gvir_config_secret_class_init(GVirConfigSecretClass *klass)
 
 static void gvir_config_secret_init(GVirConfigSecret *conn)
 {
-    GVirConfigSecretPrivate *priv;
-
     DEBUG("Init GVirConfigSecret=%p", conn);
 
-    priv = conn->priv = GVIR_CONFIG_SECRET_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_CONFIG_SECRET_GET_PRIVATE(conn);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-pool.c 
b/libvirt-gconfig/libvirt-gconfig-storage-pool.c
index 4cbda27..1295481 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-pool.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-pool.c
@@ -51,13 +51,9 @@ static void 
gvir_config_storage_pool_class_init(GVirConfigStoragePoolClass *klas
 
 static void gvir_config_storage_pool_init(GVirConfigStoragePool *conn)
 {
-    GVirConfigStoragePoolPrivate *priv;
-
     DEBUG("Init GVirConfigStoragePool=%p", conn);
 
-    priv = conn->priv = GVIR_CONFIG_STORAGE_POOL_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_CONFIG_STORAGE_POOL_GET_PRIVATE(conn);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol.c 
b/libvirt-gconfig/libvirt-gconfig-storage-vol.c
index f6bf0e3..c358f52 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-vol.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-vol.c
@@ -51,13 +51,9 @@ static void 
gvir_config_storage_vol_class_init(GVirConfigStorageVolClass *klass)
 
 static void gvir_config_storage_vol_init(GVirConfigStorageVol *conn)
 {
-    GVirConfigStorageVolPrivate *priv;
-
     DEBUG("Init GVirConfigStorageVol=%p", conn);
 
-    priv = conn->priv = GVIR_CONFIG_STORAGE_VOL_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_CONFIG_STORAGE_VOL_GET_PRIVATE(conn);
 }
 
 
diff --git a/libvirt-gobject/libvirt-gobject-connection.c 
b/libvirt-gobject/libvirt-gobject-connection.c
index 0f6e530..4ba1098 100644
--- a/libvirt-gobject/libvirt-gobject-connection.c
+++ b/libvirt-gobject/libvirt-gobject-connection.c
@@ -234,8 +234,6 @@ static void gvir_connection_init(GVirConnection *conn)
 
     priv = conn->priv = GVIR_CONNECTION_GET_PRIVATE(conn);
 
-    memset(priv, 0, sizeof(*priv));
-
     priv->lock = g_mutex_new();
 }
 
diff --git a/libvirt-gobject/libvirt-gobject-domain-snapshot.c 
b/libvirt-gobject/libvirt-gobject-domain-snapshot.c
index 96be997..0074f22 100644
--- a/libvirt-gobject/libvirt-gobject-domain-snapshot.c
+++ b/libvirt-gobject/libvirt-gobject-domain-snapshot.c
@@ -140,13 +140,9 @@ static void 
gvir_domain_snapshot_class_init(GVirDomainSnapshotClass *klass)
 
 static void gvir_domain_snapshot_init(GVirDomainSnapshot *conn)
 {
-    GVirDomainSnapshotPrivate *priv;
-
     DEBUG("Init GVirDomainSnapshot=%p", conn);
 
-    priv = conn->priv = GVIR_DOMAIN_SNAPSHOT_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_DOMAIN_SNAPSHOT_GET_PRIVATE(conn);
 }
 
 typedef struct virDomainSnapshot GVirDomainSnapshotHandle;
diff --git a/libvirt-gobject/libvirt-gobject-domain.c 
b/libvirt-gobject/libvirt-gobject-domain.c
index 1fa27bd..b4f75b9 100644
--- a/libvirt-gobject/libvirt-gobject-domain.c
+++ b/libvirt-gobject/libvirt-gobject-domain.c
@@ -215,13 +215,9 @@ static void gvir_domain_class_init(GVirDomainClass *klass)
 
 static void gvir_domain_init(GVirDomain *conn)
 {
-    GVirDomainPrivate *priv;
-
     DEBUG("Init GVirDomain=%p", conn);
 
-    priv = conn->priv = GVIR_DOMAIN_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_DOMAIN_GET_PRIVATE(conn);
 }
 
 typedef struct virDomain GVirDomainHandle;
diff --git a/libvirt-gobject/libvirt-gobject-interface.c 
b/libvirt-gobject/libvirt-gobject-interface.c
index f74b47c..082ac52 100644
--- a/libvirt-gobject/libvirt-gobject-interface.c
+++ b/libvirt-gobject/libvirt-gobject-interface.c
@@ -139,13 +139,9 @@ static void gvir_interface_class_init(GVirInterfaceClass 
*klass)
 
 static void gvir_interface_init(GVirInterface *conn)
 {
-    GVirInterfacePrivate *priv;
-
     DEBUG("Init GVirInterface=%p", conn);
 
-    priv = conn->priv = GVIR_INTERFACE_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_INTERFACE_GET_PRIVATE(conn);
 }
 
 typedef struct virInterface GVirInterfaceHandle;
diff --git a/libvirt-gobject/libvirt-gobject-manager.c 
b/libvirt-gobject/libvirt-gobject-manager.c
index 5022216..5f3a11a 100644
--- a/libvirt-gobject/libvirt-gobject-manager.c
+++ b/libvirt-gobject/libvirt-gobject-manager.c
@@ -119,8 +119,6 @@ static void gvir_manager_init(GVirManager *conn)
 
     priv = conn->priv = GVIR_MANAGER_GET_PRIVATE(conn);
 
-    memset(priv, 0, sizeof(*priv));
-
     priv->lock = g_mutex_new();
 }
 
diff --git a/libvirt-gobject/libvirt-gobject-network-filter.c 
b/libvirt-gobject/libvirt-gobject-network-filter.c
index b5ffbe7..3346c02 100644
--- a/libvirt-gobject/libvirt-gobject-network-filter.c
+++ b/libvirt-gobject/libvirt-gobject-network-filter.c
@@ -156,13 +156,9 @@ static void 
gvir_network_filter_class_init(GVirNetworkFilterClass *klass)
 
 static void gvir_network_filter_init(GVirNetworkFilter *conn)
 {
-    GVirNetworkFilterPrivate *priv;
-
     DEBUG("Init GVirNetworkFilter=%p", conn);
 
-    priv = conn->priv = GVIR_NETWORK_FILTER_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_NETWORK_FILTER_GET_PRIVATE(conn);
 }
 
 typedef struct virNWFilter GVirNetworkFilterHandle;
diff --git a/libvirt-gobject/libvirt-gobject-network.c 
b/libvirt-gobject/libvirt-gobject-network.c
index 20b8012..ddacbbd 100644
--- a/libvirt-gobject/libvirt-gobject-network.c
+++ b/libvirt-gobject/libvirt-gobject-network.c
@@ -154,13 +154,9 @@ static void gvir_network_class_init(GVirNetworkClass 
*klass)
 
 static void gvir_network_init(GVirNetwork *conn)
 {
-    GVirNetworkPrivate *priv;
-
     DEBUG("Init GVirNetwork=%p", conn);
 
-    priv = conn->priv = GVIR_NETWORK_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_NETWORK_GET_PRIVATE(conn);
 }
 
 typedef struct virNetwork GVirNetworkHandle;
diff --git a/libvirt-gobject/libvirt-gobject-node-device.c 
b/libvirt-gobject/libvirt-gobject-node-device.c
index 784c594..fbe024c 100644
--- a/libvirt-gobject/libvirt-gobject-node-device.c
+++ b/libvirt-gobject/libvirt-gobject-node-device.c
@@ -140,13 +140,9 @@ static void 
gvir_node_device_class_init(GVirNodeDeviceClass *klass)
 
 static void gvir_node_device_init(GVirNodeDevice *conn)
 {
-    GVirNodeDevicePrivate *priv;
-
     DEBUG("Init GVirNodeDevice=%p", conn);
 
-    priv = conn->priv = GVIR_NODE_DEVICE_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_NODE_DEVICE_GET_PRIVATE(conn);
 }
 
 typedef struct virNodeDevice GVirNodeDeviceHandle;
diff --git a/libvirt-gobject/libvirt-gobject-secret.c 
b/libvirt-gobject/libvirt-gobject-secret.c
index 0f885a1..683f40e 100644
--- a/libvirt-gobject/libvirt-gobject-secret.c
+++ b/libvirt-gobject/libvirt-gobject-secret.c
@@ -156,13 +156,9 @@ static void gvir_secret_class_init(GVirSecretClass *klass)
 
 static void gvir_secret_init(GVirSecret *conn)
 {
-    GVirSecretPrivate *priv;
-
     DEBUG("Init GVirSecret=%p", conn);
 
-    priv = conn->priv = GVIR_SECRET_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_SECRET_GET_PRIVATE(conn);
 }
 
 typedef struct virSecret GVirSecretHandle;
diff --git a/libvirt-gobject/libvirt-gobject-storage-pool.c 
b/libvirt-gobject/libvirt-gobject-storage-pool.c
index ccc8e8a..98daef9 100644
--- a/libvirt-gobject/libvirt-gobject-storage-pool.c
+++ b/libvirt-gobject/libvirt-gobject-storage-pool.c
@@ -170,9 +170,7 @@ static void gvir_storage_pool_init(GVirStoragePool *pool)
 
     DEBUG("Init GVirStoragePool=%p", pool);
 
-    priv = pool->priv = GVIR_STORAGE_POOL_GET_PRIVATE(pool);
-
-    memset(priv, 0, sizeof(*priv));
+    pool->priv = GVIR_STORAGE_POOL_GET_PRIVATE(pool);
 
     priv->lock = g_mutex_new();
 }
diff --git a/libvirt-gobject/libvirt-gobject-storage-vol.c 
b/libvirt-gobject/libvirt-gobject-storage-vol.c
index ed48de8..7482276 100644
--- a/libvirt-gobject/libvirt-gobject-storage-vol.c
+++ b/libvirt-gobject/libvirt-gobject-storage-vol.c
@@ -140,13 +140,9 @@ static void 
gvir_storage_vol_class_init(GVirStorageVolClass *klass)
 
 static void gvir_storage_vol_init(GVirStorageVol *conn)
 {
-    GVirStorageVolPrivate *priv;
-
     DEBUG("Init GVirStorageVol=%p", conn);
 
-    priv = conn->priv = GVIR_STORAGE_VOL_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_STORAGE_VOL_GET_PRIVATE(conn);
 }
 
 typedef struct virStorageVol GVirStorageVolHandle;
-- 
1.7.7

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

Reply via email to