summaryrefslogtreecommitdiffstats
path: root/libvirt-qemu-override.c
diff options
context:
space:
mode:
authorMartin Kletzander <mkletzan@redhat.com>2012-03-22 12:33:35 +0100
committerEric Blake <eblake@redhat.com>2012-03-26 14:45:22 -0600
commita8e031a749d4e67a27cb2004b7c50f0456ecc401 (patch)
treec28bf861d9a399304d639c4e15268613a65613e4 /libvirt-qemu-override.c
parentdc2f75d35a6461c896a738d092dc973067d0dbd4 (diff)
downloadlibvirt-python-v6-a8e031a749d4e67a27cb2004b7c50f0456ecc401.tar.gz
libvirt-python-v6-a8e031a749d4e67a27cb2004b7c50f0456ecc401.tar.xz
libvirt-python-v6-a8e031a749d4e67a27cb2004b7c50f0456ecc401.zip
Cleanup for a return statement in source files
Return statements with parameter enclosed in parentheses were modified and parentheses were removed. The whole change was scripted, here is how: List of files was obtained using this command: git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' | \ grep -e '\.[ch]$' -e '\.py$' Found files were modified with this command: sed -i -e \ 's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \ -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_' Then checked for nonsense. The whole command looks like this: git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' | \ grep -e '\.[ch]$' -e '\.py$' | xargs sed -i -e \ 's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \ -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
Diffstat (limited to 'libvirt-qemu-override.c')
-rw-r--r--libvirt-qemu-override.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libvirt-qemu-override.c b/libvirt-qemu-override.c
index c220af1..e532416 100644
--- a/libvirt-qemu-override.c
+++ b/libvirt-qemu-override.c
@@ -66,7 +66,7 @@ libvirt_qemu_virDomainQemuMonitorCommand(PyObject *self ATTRIBUTE_UNUSED,
if (!PyArg_ParseTuple(args, (char *)"Ozi:virDomainQemuMonitorCommand",
&pyobj_domain, &cmd, &flags))
- return(NULL);
+ return NULL;
domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain);
if (domain == NULL)
@@ -79,7 +79,7 @@ libvirt_qemu_virDomainQemuMonitorCommand(PyObject *self ATTRIBUTE_UNUSED,
return VIR_PY_NONE;
py_retval = PyString_FromString(result);
- return(py_retval);
+ return py_retval;
}
/************************************************************************