On 12.05.2014 17:13, Tomoki Sekiyama wrote:
Thanks for your review, and a lot of fixes :) .
Just a comment...
On 10.05.2014 01:21, Tomoki Sekiyama wrote:
diff --git a/libvirt-override.c b/libvirt-override.c
index d0557c2..d08b271 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -7564,7 +7564,7 @@ libvirt_virDomainFSFreeze(PyObject *self
ATTRIBUTE_UNUSED, PyObject *args) {
PyObject *pyobj_list;
unsigned int flags;
unsigned int nmountpoints = 0;
- const char **mountpoints = NULL;
+ char **mountpoints = NULL;
size_t i = 0, j;
if (!PyArg_ParseTuple(args, (char *)"OOi:virDomainFSFreeze",
@@ -7580,24 +7580,23 @@ libvirt_virDomainFSFreeze(PyObject *self
ATTRIBUTE_UNUSED, PyObject *args) {
for (i = 0; i < nmountpoints; i++) {
if (libvirt_charPtrUnwrap(PyList_GetItem(pyobj_list, i),
- (char **)mountpoints+i) < 0 ||
+ mountpoints+i) < 0 ||
mountpoints[i] == NULL)
goto cleanup;
}
}
LIBVIRT_BEGIN_ALLOW_THREADS;
- c_retval = virDomainFSFreeze(domain, mountpoints, nmountpoints, flags);
+ c_retval = virDomainFSFreeze(domain, (const char **) mountpoints,
+ nmountpoints, flags);
LIBVIRT_END_ALLOW_THREADS;
Maybe we should add here:
if (c_retval >= 0)
Ah, you're obviously right. I'd just rather do:
if (c_retval < 0)
goto cleanup;
Anyway, fixed in my local repo.
Michal
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list