summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-07-04 19:36:26 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-07-04 19:36:26 +0100
commit6f5ec9552ca169b66b338698850a125151e3599c (patch)
treed19c11a80397fda43af1acc38e915bcd8e3021ad
parent5b79604a6d1eb11268293342d19da633e5eedaa4 (diff)
downloaddbus-python-6f5ec9552ca169b66b338698850a125151e3599c.tar.gz
Re-indent now that the indentation is unecessary
-rw-r--r--_dbus_bindings/server.c61
1 files changed, 29 insertions, 32 deletions
diff --git a/_dbus_bindings/server.c b/_dbus_bindings/server.c
index 2d624a9..07652c4 100644
--- a/_dbus_bindings/server.c
+++ b/_dbus_bindings/server.c
@@ -100,48 +100,45 @@ DBusPyServer_set_auth_mechanisms(Server *self,
length = PySequence_Fast_GET_SIZE(fast_seq);
- /* scope for list */
- {
- list = calloc (length + 1, sizeof (char *));
+ list = calloc (length + 1, sizeof (char *));
- if (!list) {
- PyErr_NoMemory();
- goto finally;
- }
+ if (!list) {
+ PyErr_NoMemory();
+ goto finally;
+ }
- if (!(references = PyTuple_New(length)))
- goto finally;
+ if (!(references = PyTuple_New(length)))
+ goto finally;
- for (i = 0; i < length; ++i) {
- PyObject *am, *am_as_bytes;
+ for (i = 0; i < length; ++i) {
+ PyObject *am, *am_as_bytes;
- am = PySequence_Fast_GET_ITEM(auth_mechanisms, i);
- if (!am)
- goto finally;
+ am = PySequence_Fast_GET_ITEM(auth_mechanisms, i);
+ if (!am)
+ goto finally;
- if (PyUnicode_Check(am)) {
- am_as_bytes = PyUnicode_AsUTF8String(am);
- if (!am_as_bytes)
- goto finally;
- }
- else {
- am_as_bytes = am;
- Py_INCREF(am_as_bytes);
- }
- list[i] = PyBytes_AsString(am_as_bytes);
- if (!list[i])
+ if (PyUnicode_Check(am)) {
+ am_as_bytes = PyUnicode_AsUTF8String(am);
+ if (!am_as_bytes)
goto finally;
-
- PyTuple_SET_ITEM(references, i, am_as_bytes);
}
+ else {
+ am_as_bytes = am;
+ Py_INCREF(am_as_bytes);
+ }
+ list[i] = PyBytes_AsString(am_as_bytes);
+ if (!list[i])
+ goto finally;
- list[length] = NULL;
-
- Py_BEGIN_ALLOW_THREADS
- dbus_server_set_auth_mechanisms(self->server, list);
- Py_END_ALLOW_THREADS
+ PyTuple_SET_ITEM(references, i, am_as_bytes);
}
+ list[length] = NULL;
+
+ Py_BEGIN_ALLOW_THREADS
+ dbus_server_set_auth_mechanisms(self->server, list);
+ Py_END_ALLOW_THREADS
+
ret = TRUE;
finally: