summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-05 23:23:09 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-05 23:23:09 -0500
commit6210afbcff435c857458a908d730db176797a0f7 (patch)
tree4bf25a60590e7facc84e24652878d43f198a4e01
parenta187bfd98ae7b651f7c464450895ead6bdf1ddd6 (diff)
systemd-python: fix error check in _Reader.wait()
-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);