X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Ftest-journal-syslog.c;h=c99ca0654bb732c32648855214477672428eedc9;hb=8ee8e53648bf45854d92b60e1e70c17a0cec3c3d;hp=3ae8633f22446abb0b789c7df6aa2db18c9eb290;hpb=f274ece0f76b5709408821e317e87aef76123db6;p=elogind.git diff --git a/src/journal/test-journal-syslog.c b/src/journal/test-journal-syslog.c index 3ae8633f2..c99ca0654 100644 --- a/src/journal/test-journal-syslog.c +++ b/src/journal/test-journal-syslog.c @@ -25,14 +25,14 @@ 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; + _cleanup_free_ char *ident2 = NULL, *pid2 = NULL; int ret2; ret2 = syslog_parse_identifier(&buf, &ident2, &pid2); - assert(ret == ret2); - assert(ident==ident2 || !strcmp(ident, ident2)); - assert(pid==pid2 || !strcmp(pid, pid2)); + assert_se(ret == ret2); + assert_se(ident == ident2 || streq_ptr(ident, ident2)); + assert_se(pid == pid2 || streq_ptr(pid, pid2)); } int main(void) {