[systemd-commits] 2 commits - src/journal src/python-systemd
Zbigniew JÄdrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Tue Mar 5 20:43:55 PST 2013
src/journal/test-journal-syslog.c | 2 +-
src/python-systemd/_reader.c | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 6210afbcff435c857458a908d730db176797a0f7
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Tue Mar 5 23:23:09 2013 -0500
systemd-python: fix error check in _Reader.wait()
diff --git a/src/python-systemd/_reader.c b/src/python-systemd/_reader.c
index d3d45cc..7013fcf 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);
commit a187bfd98ae7b651f7c464450895ead6bdf1ddd6
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Tue Mar 5 21:43:06 2013 -0500
journal/tests: free allocated memory in test
diff --git a/src/journal/test-journal-syslog.c b/src/journal/test-journal-syslog.c
index 5cf9407..895975c 100644
--- a/src/journal/test-journal-syslog.c
+++ b/src/journal/test-journal-syslog.c
@@ -25,7 +25,7 @@
static void test_syslog_parse_identifier(const char* str,
const char *ident, const char*pid, int ret) {
const char *buf = str;
- char *ident2 = NULL, *pid2 = NULL;
+ char _cleanup_free_ *ident2 = NULL, *pid2 = NULL;
int ret2;
ret2 = syslog_parse_identifier(&buf, &ident2, &pid2);
More information about the systemd-commits
mailing list