[libvirt-glib PATCHv3 27/27] Don't memset GObject private data to 0

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

 



The GObject private data allocated with g_type_class_add_private
will be automatically zero'ed when the GObject is created so we
don't need to memset it to 0.
---
 libvirt-gconfig/libvirt-gconfig-capabilities.c     |    6 +-----
 libvirt-gconfig/libvirt-gconfig-domain-clock.c     |    6 +-----
 libvirt-gconfig/libvirt-gconfig-domain-device.c    |    6 +-----
 libvirt-gconfig/libvirt-gconfig-domain-disk.c      |    6 +-----
 .../libvirt-gconfig-domain-graphics-spice.c        |    6 +-----
 libvirt-gconfig/libvirt-gconfig-domain-graphics.c  |    6 +-----
 libvirt-gconfig/libvirt-gconfig-domain-input.c     |    6 +-----
 .../libvirt-gconfig-domain-interface-network.c     |    6 +-----
 libvirt-gconfig/libvirt-gconfig-domain-interface.c |    6 +-----
 libvirt-gconfig/libvirt-gconfig-domain-os.c        |    6 +-----
 libvirt-gconfig/libvirt-gconfig-domain-snapshot.c  |    6 +-----
 libvirt-gconfig/libvirt-gconfig-domain-timer.c     |    6 +-----
 libvirt-gconfig/libvirt-gconfig-domain-video.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-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     |    2 --
 libvirt-gobject/libvirt-gobject-storage-vol.c      |    6 +-----
 32 files changed, 30 insertions(+), 154 deletions(-)

diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities.c b/libvirt-gconfig/libvirt-gconfig-capabilities.c
index 55b196b..70bd33d 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities.c
@@ -50,13 +50,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-clock.c b/libvirt-gconfig/libvirt-gconfig-domain-clock.c
index b414c4f..27d1e67 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-clock.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-clock.c
@@ -53,13 +53,9 @@ static void gvir_config_domain_clock_class_init(GVirConfigDomainClockClass *klas
 
 static void gvir_config_domain_clock_init(GVirConfigDomainClock *klock)
 {
-    GVirConfigDomainClockPrivate *priv;
-
     DEBUG("Init GVirConfigDomainClock=%p", klock);
 
-    priv = klock->priv = GVIR_CONFIG_DOMAIN_CLOCK_GET_PRIVATE(klock);
-
-    memset(priv, 0, sizeof(*priv));
+    klock->priv = GVIR_CONFIG_DOMAIN_CLOCK_GET_PRIVATE(klock);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-device.c b/libvirt-gconfig/libvirt-gconfig-domain-device.c
index 63cf289..6dd0df1 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-device.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-device.c
@@ -51,11 +51,7 @@ static void gvir_config_domain_device_class_init(GVirConfigDomainDeviceClass *kl
 
 static void gvir_config_domain_device_init(GVirConfigDomainDevice *device)
 {
-    GVirConfigDomainDevicePrivate *priv;
-
     DEBUG("Init GVirConfigDomainDevice=%p", device);
 
-    priv = device->priv = GVIR_CONFIG_DOMAIN_DEVICE_GET_PRIVATE(device);
-
-    memset(priv, 0, sizeof(*priv));
+    device->priv = GVIR_CONFIG_DOMAIN_DEVICE_GET_PRIVATE(device);
 }
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-disk.c b/libvirt-gconfig/libvirt-gconfig-domain-disk.c
index 25810c5..8a9d6e6 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-disk.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-disk.c
@@ -53,13 +53,9 @@ static void gvir_config_domain_disk_class_init(GVirConfigDomainDiskClass *klass)
 
 static void gvir_config_domain_disk_init(GVirConfigDomainDisk *disk)
 {
-    GVirConfigDomainDiskPrivate *priv;
-
     DEBUG("Init GVirConfigDomainDisk=%p", disk);
 
-    priv = disk->priv = GVIR_CONFIG_DOMAIN_DISK_GET_PRIVATE(disk);
-
-    memset(priv, 0, sizeof(*priv));
+    disk->priv = GVIR_CONFIG_DOMAIN_DISK_GET_PRIVATE(disk);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
index e49a818..e5c2ff8 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
@@ -53,13 +53,9 @@ static void gvir_config_domain_graphics_spice_class_init(GVirConfigDomainGraphic
 
 static void gvir_config_domain_graphics_spice_init(GVirConfigDomainGraphicsSpice *graphics_spice)
 {
-    GVirConfigDomainGraphicsSpicePrivate *priv;
-
     DEBUG("Init GVirConfigDomainGraphicsSpice=%p", graphics_spice);
 
-    priv = graphics_spice->priv = GVIR_CONFIG_DOMAIN_GRAPHICS_SPICE_GET_PRIVATE(graphics_spice);
-
-    memset(priv, 0, sizeof(*priv));
+    graphics_spice->priv = GVIR_CONFIG_DOMAIN_GRAPHICS_SPICE_GET_PRIVATE(graphics_spice);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics.c
index 6e48b72..1c2a2ad 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics.c
@@ -51,11 +51,7 @@ static void gvir_config_domain_graphics_class_init(GVirConfigDomainGraphicsClass
 
 static void gvir_config_domain_graphics_init(GVirConfigDomainGraphics *graphics)
 {
-    GVirConfigDomainGraphicsPrivate *priv;
-
     DEBUG("Init GVirConfigDomainGraphics=%p", graphics);
 
-    priv = graphics->priv = GVIR_CONFIG_DOMAIN_GRAPHICS_GET_PRIVATE(graphics);
-
-    memset(priv, 0, sizeof(*priv));
+    graphics->priv = GVIR_CONFIG_DOMAIN_GRAPHICS_GET_PRIVATE(graphics);
 }
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-input.c b/libvirt-gconfig/libvirt-gconfig-domain-input.c
index 8d4a09f..ad11472 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-input.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-input.c
@@ -53,13 +53,9 @@ static void gvir_config_domain_input_class_init(GVirConfigDomainInputClass *klas
 
 static void gvir_config_domain_input_init(GVirConfigDomainInput *device_input)
 {
-    GVirConfigDomainInputPrivate *priv;
-
     DEBUG("Init GVirConfigDomainInput=%p", device_input);
 
-    priv = device_input->priv = GVIR_CONFIG_DOMAIN_INPUT_GET_PRIVATE(device_input);
-
-    memset(priv, 0, sizeof(*priv));
+    device_input->priv = GVIR_CONFIG_DOMAIN_INPUT_GET_PRIVATE(device_input);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface-network.c b/libvirt-gconfig/libvirt-gconfig-domain-interface-network.c
index 31e18c4..e559df4 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface-network.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface-network.c
@@ -53,13 +53,9 @@ static void gvir_config_domain_interface_network_class_init(GVirConfigDomainInte
 
 static void gvir_config_domain_interface_network_init(GVirConfigDomainInterfaceNetwork *conn)
 {
-    GVirConfigDomainInterfaceNetworkPrivate *priv;
-
     DEBUG("Init GVirConfigDomainInterfaceNetwork=%p", conn);
 
-    priv = conn->priv = GVIR_CONFIG_DOMAIN_INTERFACE_NETWORK_GET_PRIVATE(conn);
-
-    memset(priv, 0, sizeof(*priv));
+    conn->priv = GVIR_CONFIG_DOMAIN_INTERFACE_NETWORK_GET_PRIVATE(conn);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface.c b/libvirt-gconfig/libvirt-gconfig-domain-interface.c
index ecabfae..3af98ee 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-interface.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-interface.c
@@ -50,11 +50,7 @@ static void gvir_config_domain_interface_class_init(GVirConfigDomainInterfaceCla
 
 static void gvir_config_domain_interface_init(GVirConfigDomainInterface *interface)
 {
-    GVirConfigDomainInterfacePrivate *priv;
-
     DEBUG("Init GVirConfigDomainInterface=%p", interface);
 
-    priv = interface->priv = GVIR_CONFIG_DOMAIN_INTERFACE_GET_PRIVATE(interface);
-
-    memset(priv, 0, sizeof(*priv));
+    interface->priv = GVIR_CONFIG_DOMAIN_INTERFACE_GET_PRIVATE(interface);
 }
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-os.c b/libvirt-gconfig/libvirt-gconfig-domain-os.c
index 412ed41..f1802ae 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-os.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-os.c
@@ -53,13 +53,9 @@ static void gvir_config_domain_os_class_init(GVirConfigDomainOsClass *klass)
 
 static void gvir_config_domain_os_init(GVirConfigDomainOs *os)
 {
-    GVirConfigDomainOsPrivate *priv;
-
     DEBUG("Init GVirConfigDomainOs=%p", os);
 
-    priv = os->priv = GVIR_CONFIG_DOMAIN_OS_GET_PRIVATE(os);
-
-    memset(priv, 0, sizeof(*priv));
+    os->priv = GVIR_CONFIG_DOMAIN_OS_GET_PRIVATE(os);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-snapshot.c b/libvirt-gconfig/libvirt-gconfig-domain-snapshot.c
index aa74254..5835e69 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-snapshot.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-snapshot.c
@@ -50,13 +50,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-timer.c b/libvirt-gconfig/libvirt-gconfig-domain-timer.c
index 179d8b2..e03a2a2 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-timer.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-timer.c
@@ -51,13 +51,9 @@ static void gvir_config_domain_timer_class_init(GVirConfigDomainTimerClass *klas
 
 static void gvir_config_domain_timer_init(GVirConfigDomainTimer *timer)
 {
-    GVirConfigDomainTimerPrivate *priv;
-
     DEBUG("Init GVirConfigDomainTimer=%p", timer);
 
-    priv = timer->priv = GVIR_CONFIG_DOMAIN_TIMER_GET_PRIVATE(timer);
-
-    memset(priv, 0, sizeof(*priv));
+    timer->priv = GVIR_CONFIG_DOMAIN_TIMER_GET_PRIVATE(timer);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-video.c b/libvirt-gconfig/libvirt-gconfig-domain-video.c
index 80ecf6b..8c6c9fb 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-video.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-video.c
@@ -53,13 +53,9 @@ static void gvir_config_domain_video_class_init(GVirConfigDomainVideoClass *klas
 
 static void gvir_config_domain_video_init(GVirConfigDomainVideo *video)
 {
-    GVirConfigDomainVideoPrivate *priv;
-
     DEBUG("Init GVirConfigDomainVideo=%p", video);
 
-    priv = video->priv = GVIR_CONFIG_DOMAIN_VIDEO_GET_PRIVATE(video);
-
-    memset(priv, 0, sizeof(*priv));
+    video->priv = GVIR_CONFIG_DOMAIN_VIDEO_GET_PRIVATE(video);
 }
 
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c b/libvirt-gconfig/libvirt-gconfig-domain.c
index 6cee46f..2c21219 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain.c
@@ -151,13 +151,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 b58a4b4..cffd840 100644
--- a/libvirt-gconfig/libvirt-gconfig-interface.c
+++ b/libvirt-gconfig/libvirt-gconfig-interface.c
@@ -50,13 +50,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 bea21a3..dcf9e56 100644
--- a/libvirt-gconfig/libvirt-gconfig-network-filter.c
+++ b/libvirt-gconfig/libvirt-gconfig-network-filter.c
@@ -50,13 +50,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 26d5d61..73092de 100644
--- a/libvirt-gconfig/libvirt-gconfig-network.c
+++ b/libvirt-gconfig/libvirt-gconfig-network.c
@@ -50,13 +50,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 71389ef..fa679b1 100644
--- a/libvirt-gconfig/libvirt-gconfig-node-device.c
+++ b/libvirt-gconfig/libvirt-gconfig-node-device.c
@@ -50,13 +50,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 142d714..edbaf57 100644
--- a/libvirt-gconfig/libvirt-gconfig-object.c
+++ b/libvirt-gconfig/libvirt-gconfig-object.c
@@ -178,13 +178,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 6267cf5..0c5de85 100644
--- a/libvirt-gconfig/libvirt-gconfig-secret.c
+++ b/libvirt-gconfig/libvirt-gconfig-secret.c
@@ -50,13 +50,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 8a70ac2..aad60ed 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-pool.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-pool.c
@@ -50,13 +50,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 4a17c45..4a59b72 100644
--- a/libvirt-gconfig/libvirt-gconfig-storage-vol.c
+++ b/libvirt-gconfig/libvirt-gconfig-storage-vol.c
@@ -50,13 +50,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-domain-snapshot.c b/libvirt-gobject/libvirt-gobject-domain-snapshot.c
index 52d9809..afd1e96 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 36d618c..464d287 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 ee474d7..3be633c 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 bde9b4f..01e9636 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 6316fd4..3c49117 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 5ee6fda..04d7d04 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 2109819..f2fd9a8 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 abf018b..cb69e7e 100644
--- a/libvirt-gobject/libvirt-gobject-storage-pool.c
+++ b/libvirt-gobject/libvirt-gobject-storage-pool.c
@@ -172,8 +172,6 @@ static void gvir_storage_pool_init(GVirStoragePool *pool)
 
     priv = pool->priv = GVIR_STORAGE_POOL_GET_PRIVATE(pool);
 
-    memset(priv, 0, sizeof(*priv));
-
     priv->lock = g_mutex_new();
 }
 
diff --git a/libvirt-gobject/libvirt-gobject-storage-vol.c b/libvirt-gobject/libvirt-gobject-storage-vol.c
index 245de6f..0c8cb09 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.3

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


[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]