[libvirt] [PATCH python] Remove unused variables for event callbacks

Daniel P. Berrange posted 1 patch 6 years, 7 months ago
Failed in applying to current master (apply log)
libvirt-override.c | 22 ----------------------
1 file changed, 22 deletions(-)
[libvirt] [PATCH python] Remove unused variables for event callbacks
Posted by Daniel P. Berrange 6 years, 7 months ago
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 libvirt-override.c | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/libvirt-override.c b/libvirt-override.c
index c04ce2e..a3a0508 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -5182,19 +5182,11 @@ libvirt_virConnectDomainEventDeregister(PyObject *self ATTRIBUTE_UNUSED,
  * Event Impl
  *******************************************/
 static PyObject *addHandleObj;
-static char *addHandleName;
 static PyObject *updateHandleObj;
-static char *updateHandleName;
 static PyObject *removeHandleObj;
-static char *removeHandleName;
 static PyObject *addTimeoutObj;
-static char *addTimeoutName;
 static PyObject *updateTimeoutObj;
-static char *updateTimeoutName;
 static PyObject *removeTimeoutObj;
-static char *removeTimeoutName;
-
-#define NAME(fn) ( fn ## Name ? fn ## Name : # fn )
 
 static int
 libvirt_virEventAddHandleFunc(int fd,
@@ -5442,12 +5434,6 @@ libvirt_virEventRegisterImpl(PyObject *self ATTRIBUTE_UNUSED,
     Py_XDECREF(addTimeoutObj);
     Py_XDECREF(updateTimeoutObj);
     Py_XDECREF(removeTimeoutObj);
-    VIR_FREE(addHandleName);
-    VIR_FREE(updateHandleName);
-    VIR_FREE(removeHandleName);
-    VIR_FREE(addTimeoutName);
-    VIR_FREE(updateTimeoutName);
-    VIR_FREE(removeTimeoutName);
 
     /* Parse and check arguments */
     if (!PyArg_ParseTuple(args, (char *) "OOOOOO:virEventRegisterImpl",
@@ -5462,14 +5448,6 @@ libvirt_virEventRegisterImpl(PyObject *self ATTRIBUTE_UNUSED,
         !PyCallable_Check(removeTimeoutObj))
         return NULL;
 
-    /* Get argument string representations (for error reporting) */
-    addHandleName = py_str(addHandleObj);
-    updateHandleName = py_str(updateHandleObj);
-    removeHandleName = py_str(removeHandleObj);
-    addTimeoutName = py_str(addTimeoutObj);
-    updateTimeoutName = py_str(updateTimeoutObj);
-    removeTimeoutName = py_str(removeTimeoutObj);
-
     /* Inc refs since we're holding on to these objects until
      * the next call (if any) to this function.
      */
-- 
2.13.5

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH python] Remove unused variables for event callbacks
Posted by Michal Privoznik 6 years, 7 months ago
On 09/04/2017 03:06 PM, Daniel P. Berrange wrote:
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
>  libvirt-override.c | 22 ----------------------
>  1 file changed, 22 deletions(-)

ACK

Michal

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