[libvirt] [PATCH] python: let libvirt_virConnectDomainEventCallback indicate success

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

 



First dead-store-related bug fix:

>From 6024fb05dfa2dd408ad79abbac88791f5048af11 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@xxxxxxxxxx>
Date: Thu, 3 Sep 2009 14:09:49 +0200
Subject: [PATCH] python: let libvirt_virConnectDomainEventCallback indicate success

* python/libvir.c (libvirt_virConnectDomainEventCallback): Return 0
when successful, rather than always returning -1.
clang flagged this function for its dead-store of "ret=0".
Once "ret" was set to 0, it was never used, and
the function would always return -1.
---
 python/libvir.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/python/libvir.c b/python/libvir.c
index e2c196a..0c00b80 100644
--- a/python/libvir.c
+++ b/python/libvir.c
@@ -4,7 +4,7 @@
  *           entry points where an automatically generated stub is
  *           unpractical
  *
- * Copyright (C) 2005, 2007, 2008 Red Hat, Inc.
+ * Copyright (C) 2005, 2007-2009 Red Hat, Inc.
  *
  * Daniel Veillard <veillard@xxxxxxxxxx>
  */
@@ -1812,7 +1812,7 @@ libvirt_virConnectDomainEventCallback(virConnectPtr conn ATTRIBUTE_UNUSED,

 cleanup:
     LIBVIRT_RELEASE_THREAD_STATE;
-    return -1;
+    return ret;
 }

 static PyObject *
--
1.6.4.2.395.ge3d52

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