summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOsier Yang <jyang@redhat.com>2013-05-21 16:05:06 +0800
committerOsier Yang <jyang@redhat.com>2013-05-21 23:41:45 +0800
commit1da3b6892540af138c46d204c61ff562e4939339 (patch)
tree055c0ea334c46e6e416fef09904ad52eaae1d6f8
parent0813300a8f98c372bafb754e9b6db5bdfb84fc83 (diff)
downloadlibvirt-python-split-1da3b6892540af138c46d204c61ff562e4939339.zip
libvirt-python-split-1da3b6892540af138c46d204c61ff562e4939339.tar.gz
libvirt-python-split-1da3b6892540af138c46d204c61ff562e4939339.tar.xz
python: Remove the whitespace before ";"v1.0.6-rc1
-rw-r--r--libvirt-lxc-override.c4
-rw-r--r--libvirt-override.c16
2 files changed, 10 insertions, 10 deletions
diff --git a/libvirt-lxc-override.c b/libvirt-lxc-override.c
index ead175f..c69affc 100644
--- a/libvirt-lxc-override.c
+++ b/libvirt-lxc-override.c
@@ -81,7 +81,7 @@ libvirt_lxc_virDomainLxcOpenNamespace(PyObject *self ATTRIBUTE_UNUSED,
return VIR_PY_NONE;
py_retval = PyList_New(c_retval);
- for (i = 0 ; i < c_retval ; i++) {
+ for (i = 0; i < c_retval; i++) {
PyObject *item = NULL;
if ((item = PyInt_FromLong(fdlist[i])) == NULL)
@@ -95,7 +95,7 @@ libvirt_lxc_virDomainLxcOpenNamespace(PyObject *self ATTRIBUTE_UNUSED,
return py_retval;
error:
- for (i = 0 ; i < c_retval ; i++) {
+ for (i = 0; i < c_retval; i++) {
VIR_FORCE_CLOSE(fdlist[i]);
}
VIR_FREE(fdlist);
diff --git a/libvirt-override.c b/libvirt-override.c
index fd9ebb8..6ed2624 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -81,7 +81,7 @@ getPyVirTypedParameter(const virTypedParameterPtr params, int nparams)
if ((info = PyDict_New()) == NULL)
return NULL;
- for (i = 0 ; i < nparams ; i++) {
+ for (i = 0; i < nparams; i++) {
switch (params[i].type) {
case VIR_TYPED_PARAM_INT:
val = PyInt_FromLong(params[i].value.i);
@@ -1409,7 +1409,7 @@ libvirt_virDomainGetVcpus(PyObject *self ATTRIBUTE_UNUSED,
if ((pycpumap = PyList_New(dominfo.nrVirtCpu)) == NULL)
goto cleanup;
- for (i = 0 ; i < dominfo.nrVirtCpu ; i++) {
+ for (i = 0; i < dominfo.nrVirtCpu; i++) {
PyObject *info = PyTuple_New(4);
PyObject *item = NULL;
@@ -1441,12 +1441,12 @@ libvirt_virDomainGetVcpus(PyObject *self ATTRIBUTE_UNUSED,
Py_XDECREF(item);
goto cleanup;
}
- for (i = 0 ; i < dominfo.nrVirtCpu ; i++) {
+ for (i = 0; i < dominfo.nrVirtCpu; i++) {
PyObject *info = PyTuple_New(cpunum);
int j;
if (info == NULL)
goto cleanup;
- for (j = 0 ; j < cpunum ; j++) {
+ for (j = 0; j < cpunum; j++) {
PyObject *item = NULL;
if ((item = PyBool_FromLong(VIR_CPU_USABLE(cpumap, cpumaplen, i, j))) == NULL ||
PyTuple_SetItem(info, j, item) < 0) {
@@ -1950,7 +1950,7 @@ static int virConnectCredCallbackWrapper(virConnectCredentialPtr cred,
list = PyTuple_New(2);
pycred = PyTuple_New(ncred);
- for (i = 0 ; i < ncred ; i++) {
+ for (i = 0; i < ncred; i++) {
PyObject *pycreditem;
pycreditem = PyList_New(5);
Py_INCREF(Py_None);
@@ -1985,7 +1985,7 @@ static int virConnectCredCallbackWrapper(virConnectCredentialPtr cred,
ret = PyLong_AsLong(pyret);
if (ret == 0) {
- for (i = 0 ; i < ncred ; i++) {
+ for (i = 0; i < ncred; i++) {
PyObject *pycreditem;
PyObject *pyresult;
char *result = NULL;
@@ -2036,7 +2036,7 @@ libvirt_virConnectOpenAuth(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
int i;
if (VIR_ALLOC_N(auth.credtype, auth.ncredtype) < 0)
return VIR_PY_NONE;
- for (i = 0 ; i < auth.ncredtype ; i++) {
+ for (i = 0; i < auth.ncredtype; i++) {
PyObject *val;
val = PyList_GetItem(pycredtype, i);
auth.credtype[i] = (int)PyLong_AsLong(val);
@@ -5655,7 +5655,7 @@ libvirt_virConnectDomainEventGraphicsCallback(virConnectPtr conn ATTRIBUTE_UNUSE
libvirt_constcharPtrWrap(remote->service));
pyobj_subject = PyList_New(subject->nidentity);
- for (i = 0 ; i < subject->nidentity ; i++) {
+ for (i = 0; i < subject->nidentity; i++) {
PyObject *pair = PyTuple_New(2);
PyTuple_SetItem(pair, 0, libvirt_constcharPtrWrap(subject->identities[i].type));
PyTuple_SetItem(pair, 1, libvirt_constcharPtrWrap(subject->identities[i].name));