mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-23 11:52:20 +00:00
python: Remove the whitespace before ";"
This commit is contained in:
parent
6da965692c
commit
ea4e554038
@ -81,7 +81,7 @@ libvirt_lxc_virDomainLxcOpenNamespace(PyObject *self ATTRIBUTE_UNUSED,
|
|||||||
return VIR_PY_NONE;
|
return VIR_PY_NONE;
|
||||||
|
|
||||||
py_retval = PyList_New(c_retval);
|
py_retval = PyList_New(c_retval);
|
||||||
for (i = 0 ; i < c_retval ; i++) {
|
for (i = 0; i < c_retval; i++) {
|
||||||
PyObject *item = NULL;
|
PyObject *item = NULL;
|
||||||
|
|
||||||
if ((item = PyInt_FromLong(fdlist[i])) == NULL)
|
if ((item = PyInt_FromLong(fdlist[i])) == NULL)
|
||||||
@ -95,7 +95,7 @@ libvirt_lxc_virDomainLxcOpenNamespace(PyObject *self ATTRIBUTE_UNUSED,
|
|||||||
return py_retval;
|
return py_retval;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
for (i = 0 ; i < c_retval ; i++) {
|
for (i = 0; i < c_retval; i++) {
|
||||||
VIR_FORCE_CLOSE(fdlist[i]);
|
VIR_FORCE_CLOSE(fdlist[i]);
|
||||||
}
|
}
|
||||||
VIR_FREE(fdlist);
|
VIR_FREE(fdlist);
|
||||||
|
@ -81,7 +81,7 @@ getPyVirTypedParameter(const virTypedParameterPtr params, int nparams)
|
|||||||
if ((info = PyDict_New()) == NULL)
|
if ((info = PyDict_New()) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (i = 0 ; i < nparams ; i++) {
|
for (i = 0; i < nparams; i++) {
|
||||||
switch (params[i].type) {
|
switch (params[i].type) {
|
||||||
case VIR_TYPED_PARAM_INT:
|
case VIR_TYPED_PARAM_INT:
|
||||||
val = PyInt_FromLong(params[i].value.i);
|
val = PyInt_FromLong(params[i].value.i);
|
||||||
@ -1409,7 +1409,7 @@ libvirt_virDomainGetVcpus(PyObject *self ATTRIBUTE_UNUSED,
|
|||||||
if ((pycpumap = PyList_New(dominfo.nrVirtCpu)) == NULL)
|
if ((pycpumap = PyList_New(dominfo.nrVirtCpu)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
for (i = 0 ; i < dominfo.nrVirtCpu ; i++) {
|
for (i = 0; i < dominfo.nrVirtCpu; i++) {
|
||||||
PyObject *info = PyTuple_New(4);
|
PyObject *info = PyTuple_New(4);
|
||||||
PyObject *item = NULL;
|
PyObject *item = NULL;
|
||||||
|
|
||||||
@ -1441,12 +1441,12 @@ libvirt_virDomainGetVcpus(PyObject *self ATTRIBUTE_UNUSED,
|
|||||||
Py_XDECREF(item);
|
Py_XDECREF(item);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
for (i = 0 ; i < dominfo.nrVirtCpu ; i++) {
|
for (i = 0; i < dominfo.nrVirtCpu; i++) {
|
||||||
PyObject *info = PyTuple_New(cpunum);
|
PyObject *info = PyTuple_New(cpunum);
|
||||||
int j;
|
int j;
|
||||||
if (info == NULL)
|
if (info == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
for (j = 0 ; j < cpunum ; j++) {
|
for (j = 0; j < cpunum; j++) {
|
||||||
PyObject *item = NULL;
|
PyObject *item = NULL;
|
||||||
if ((item = PyBool_FromLong(VIR_CPU_USABLE(cpumap, cpumaplen, i, j))) == NULL ||
|
if ((item = PyBool_FromLong(VIR_CPU_USABLE(cpumap, cpumaplen, i, j))) == NULL ||
|
||||||
PyTuple_SetItem(info, j, item) < 0) {
|
PyTuple_SetItem(info, j, item) < 0) {
|
||||||
@ -1950,7 +1950,7 @@ static int virConnectCredCallbackWrapper(virConnectCredentialPtr cred,
|
|||||||
|
|
||||||
list = PyTuple_New(2);
|
list = PyTuple_New(2);
|
||||||
pycred = PyTuple_New(ncred);
|
pycred = PyTuple_New(ncred);
|
||||||
for (i = 0 ; i < ncred ; i++) {
|
for (i = 0; i < ncred; i++) {
|
||||||
PyObject *pycreditem;
|
PyObject *pycreditem;
|
||||||
pycreditem = PyList_New(5);
|
pycreditem = PyList_New(5);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
@ -1985,7 +1985,7 @@ static int virConnectCredCallbackWrapper(virConnectCredentialPtr cred,
|
|||||||
|
|
||||||
ret = PyLong_AsLong(pyret);
|
ret = PyLong_AsLong(pyret);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
for (i = 0 ; i < ncred ; i++) {
|
for (i = 0; i < ncred; i++) {
|
||||||
PyObject *pycreditem;
|
PyObject *pycreditem;
|
||||||
PyObject *pyresult;
|
PyObject *pyresult;
|
||||||
char *result = NULL;
|
char *result = NULL;
|
||||||
@ -2036,7 +2036,7 @@ libvirt_virConnectOpenAuth(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
|
|||||||
int i;
|
int i;
|
||||||
if (VIR_ALLOC_N(auth.credtype, auth.ncredtype) < 0)
|
if (VIR_ALLOC_N(auth.credtype, auth.ncredtype) < 0)
|
||||||
return VIR_PY_NONE;
|
return VIR_PY_NONE;
|
||||||
for (i = 0 ; i < auth.ncredtype ; i++) {
|
for (i = 0; i < auth.ncredtype; i++) {
|
||||||
PyObject *val;
|
PyObject *val;
|
||||||
val = PyList_GetItem(pycredtype, i);
|
val = PyList_GetItem(pycredtype, i);
|
||||||
auth.credtype[i] = (int)PyLong_AsLong(val);
|
auth.credtype[i] = (int)PyLong_AsLong(val);
|
||||||
@ -5655,7 +5655,7 @@ libvirt_virConnectDomainEventGraphicsCallback(virConnectPtr conn ATTRIBUTE_UNUSE
|
|||||||
libvirt_constcharPtrWrap(remote->service));
|
libvirt_constcharPtrWrap(remote->service));
|
||||||
|
|
||||||
pyobj_subject = PyList_New(subject->nidentity);
|
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);
|
PyObject *pair = PyTuple_New(2);
|
||||||
PyTuple_SetItem(pair, 0, libvirt_constcharPtrWrap(subject->identities[i].type));
|
PyTuple_SetItem(pair, 0, libvirt_constcharPtrWrap(subject->identities[i].type));
|
||||||
PyTuple_SetItem(pair, 1, libvirt_constcharPtrWrap(subject->identities[i].name));
|
PyTuple_SetItem(pair, 1, libvirt_constcharPtrWrap(subject->identities[i].name));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user