From 3f7b839cd8f84ae3d4da51bfa5e4d0b5c109a978 Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Fri, 20 Jan 2017 13:09:00 -0800 Subject: [PATCH] journal probe: use the new macros Signed-off-by: Patrick McCarty --- src/probes/journal.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/src/probes/journal.c b/src/probes/journal.c index aeace2f..e100f24 100644 --- a/src/probes/journal.c +++ b/src/probes/journal.c @@ -222,30 +222,12 @@ static bool add_filters(sd_journal *journal) return false; } - r = sd_journal_add_match(journal, data, 0); - if (r < 0) { - tm_journal_match_err(r); - return false; - } + JOURNAL_MATCH(data); free(data); - - r = sd_journal_add_match(journal, "PRIORITY=1", 0); - if (r < 0) { - tm_journal_match_err(r); - return false; - } - - r = sd_journal_add_match(journal, "PRIORITY=2", 0); - if (r < 0) { - tm_journal_match_err(r); - return false; - } - - r = sd_journal_add_match(journal, "PRIORITY=3", 0); - if (r < 0) { - tm_journal_match_err(r); - return false; - } + // The three highest log levels, all indicating errors + JOURNAL_MATCH("PRIORITY=1"); + JOURNAL_MATCH("PRIORITY=2"); + JOURNAL_MATCH("PRIORITY=3"); return true; }