[libvirt] [libvirt-glib] [PATCH] Remove #if 0's from libvirt-gobject-domain-snapshot

The code seems to be fine. --- I'd like to use this code (in later patches). If anything is wrong with the current implementation, I'd like to know so I can fix it. libvirt-gobject/libvirt-gobject-domain-snapshot.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/libvirt-gobject/libvirt-gobject-domain-snapshot.c b/libvirt-gobject/libvirt-gobject-domain-snapshot.c index d4e9b97..ab23342 100644 --- a/libvirt-gobject/libvirt-gobject-domain-snapshot.c +++ b/libvirt-gobject/libvirt-gobject-domain-snapshot.c @@ -144,9 +144,7 @@ typedef struct virDomainSnapshot GVirDomainSnapshotHandle; static GVirDomainSnapshotHandle* gvir_domain_snapshot_handle_copy(GVirDomainSnapshotHandle *src) { -#if 0 virDomainSnapshotRef((virDomainSnapshotPtr)src); -#endif return src; } @@ -162,7 +160,7 @@ G_DEFINE_BOXED_TYPE(GVirDomainSnapshotHandle, gvir_domain_snapshot_handle, const gchar *gvir_domain_snapshot_get_name(GVirDomainSnapshot *snapshot) { g_return_val_if_fail(GVIR_IS_DOMAIN_SNAPSHOT(snapshot), NULL); -#if 0 + GVirDomainSnapshotPrivate *priv = snapshot->priv; const char *name; @@ -172,12 +170,6 @@ const gchar *gvir_domain_snapshot_get_name(GVirDomainSnapshot *snapshot) } return name; -#else - if (snapshot) - return NULL; -#endif - - g_return_val_if_reached(NULL); } -- 1.9.3

On Tue, May 20, 2014 at 08:56:24PM +0200, Timm Bäder wrote:
The code seems to be fine. ---
I'd like to use this code (in later patches). If anything is wrong with the current implementation, I'd like to know so I can fix it.
This is just historical cruft. IIRC, I had #if 0'd it, because at the time I wrote this, virDomainSnapshotRef didn't exist, but this is long since added. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 21.05, Daniel P. Berrange wrote:
On Tue, May 20, 2014 at 08:56:24PM +0200, Timm Bäder wrote:
The code seems to be fine. ---
I'd like to use this code (in later patches). If anything is wrong with the current implementation, I'd like to know so I can fix it.
This is just historical cruft. IIRC, I had #if 0'd it, because at the time I wrote this, virDomainSnapshotRef didn't exist, but this is long since added.
Regards, Daniel
Well, that's even better, thanks. Is that patch OK in its current form?

On Sat, May 24, 2014 at 10:09:05AM +0200, Timm Bäder wrote:
On 21.05, Daniel P. Berrange wrote:
On Tue, May 20, 2014 at 08:56:24PM +0200, Timm Bäder wrote:
The code seems to be fine. ---
I'd like to use this code (in later patches). If anything is wrong with the current implementation, I'd like to know so I can fix it.
This is just historical cruft. IIRC, I had #if 0'd it, because at the time I wrote this, virDomainSnapshotRef didn't exist, but this is long since added.
Regards, Daniel
Well, that's even better, thanks. Is that patch OK in its current form?
This looks good yes, ACK and will be pushed soon. Christophe
participants (3)
-
Christophe Fergeau
-
Daniel P. Berrange
-
Timm Bäder