X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fsd-journal.c;h=4579e9ee2dedcf532d34b0e382717e79f784eed5;hb=26fefda707e6511733f48da03b281a004dba6abf;hp=81b0c136f59cfee4812438cc635497c67b6127f0;hpb=a65f06bb27688a6738f2f94b7f055f4c66768d63;p=elogind.git diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 81b0c136f..4579e9ee2 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -186,7 +186,7 @@ static Match *match_new(Match *p, MatchType t) { if (p) { m->parent = p; - LIST_PREPEND(Match, matches, p->matches, m); + LIST_PREPEND(matches, p->matches, m); } return m; @@ -199,7 +199,7 @@ static void match_free(Match *m) { match_free(m->matches); if (m->parent) - LIST_REMOVE(Match, matches, m->parent->matches, m); + LIST_REMOVE(matches, m->parent->matches, m); free(m->data); free(m); @@ -362,7 +362,7 @@ static char *match_make_string(Match *m) { bool enclose = false; if (!m) - return strdup(""); + return strdup("none"); if (m->type == MATCH_DISCRETE) return strndup(m->data, m->size); @@ -1266,17 +1266,17 @@ static void check_network(sd_journal *j, int fd) { return; j->on_network = - F_TYPE_CMP(sfs.f_type, CIFS_MAGIC_NUMBER) || - F_TYPE_CMP(sfs.f_type, CODA_SUPER_MAGIC) || - F_TYPE_CMP(sfs.f_type, NCP_SUPER_MAGIC) || - F_TYPE_CMP(sfs.f_type, NFS_SUPER_MAGIC) || - F_TYPE_CMP(sfs.f_type, SMB_SUPER_MAGIC); + F_TYPE_EQUAL(sfs.f_type, CIFS_MAGIC_NUMBER) || + F_TYPE_EQUAL(sfs.f_type, CODA_SUPER_MAGIC) || + F_TYPE_EQUAL(sfs.f_type, NCP_SUPER_MAGIC) || + F_TYPE_EQUAL(sfs.f_type, NFS_SUPER_MAGIC) || + F_TYPE_EQUAL(sfs.f_type, SMB_SUPER_MAGIC); } static bool file_has_type_prefix(const char *prefix, const char *filename) { const char *full, *tilded, *atted; - full = strappend(prefix, ".journal"); + full = strappenda(prefix, ".journal"); tilded = strappenda(full, "~"); atted = strappenda(prefix, "@");