summaryrefslogtreecommitdiff
path: root/src/python-systemd/_reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/python-systemd/_reader.c')
-rw-r--r--src/python-systemd/_reader.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/python-systemd/_reader.c b/src/python-systemd/_reader.c
index d3d45cc015..7013fcfcef 100644
--- a/src/python-systemd/_reader.c
+++ b/src/python-systemd/_reader.c
@@ -507,9 +507,10 @@ static PyObject* Reader_wait(Reader *self, PyObject *args, PyObject *keywds)
return NULL;
Py_BEGIN_ALLOW_THREADS
- r = sd_journal_wait(self->j, timeout ==0 ? (uint64_t) -1 : timeout * 1E6);
+ r = sd_journal_wait(self->j,
+ timeout == 0 ? (uint64_t) -1 : timeout * 1E6);
Py_END_ALLOW_THREADS
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
return long_FromLong(r);