[libvirt] [PATCH] python: Fix bogus label placement

--- python/libvirt-override.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/python/libvirt-override.c b/python/libvirt-override.c index 8be9af7..2b88796 100644 --- a/python/libvirt-override.c +++ b/python/libvirt-override.c @@ -1489,13 +1489,12 @@ libvirt_virNodeGetCellsFreeMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *arg return(NULL); if ((startCell < 0) || (maxCells <= 0) || (startCell + maxCells > 10000)) - goto error; + return VIR_PY_NONE; conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn); - freeMems = - malloc(maxCells * sizeof(*freeMems)); + freeMems = malloc(maxCells * sizeof(*freeMems)); if (freeMems == NULL) - goto error; + return VIR_PY_NONE; LIBVIRT_BEGIN_ALLOW_THREADS; c_retval = virNodeGetCellsFreeMemory(conn, freeMems, startCell, maxCells); @@ -1503,7 +1502,6 @@ libvirt_virNodeGetCellsFreeMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *arg if (c_retval < 0) { free(freeMems); -error: return VIR_PY_NONE; } py_retval = PyList_New(c_retval); -- 1.7.4.1

2011/7/7 Laine Stump <laine@laine.org>:
On 07/07/2011 03:23 AM, Matthias Bolte wrote:
--- python/libvirt-override.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-)
ACK. (couldn't resist, could you? :-P)
No, and I also did a complete label name and indentation cleanup one the whole codebase, but I'm not going to post that as it's over 4000 lines changed. And yes, sometimes I feel like wasting two hours on stuff like this :) I'll only post patches for the weird stuff like this one that I've pushed now. -- Matthias Bolte http://photron.blogspot.com
participants (2)
-
Laine Stump
-
Matthias Bolte