From f4cf1d66f7de9b588ba0b0721ee94bff62295361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 6 Jun 2018 14:44:34 +0200 Subject: [PATCH 1/2] Remove NULL terminator from two log_struct calls Fixup for a1230ff972. I forgot to press "save" ;( --- src/login/logind-session.c | 3 +-- src/resolve/resolved-dns-server.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 5a31a8fe07..df04a4748e 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -680,8 +680,7 @@ static int session_stop_scope(Session *s, bool force) { "SESSION_ID=%s", s->id, "USER_ID=%s", s->user->name, "LEADER="PID_FMT, s->leader, - LOG_MESSAGE("Session %s logged out. Waiting for processes to exit.", s->id), - NULL); + LOG_MESSAGE("Session %s logged out. Waiting for processes to exit.", s->id)); } return 0; diff --git a/src/resolve/resolved-dns-server.c b/src/resolve/resolved-dns-server.c index 5abb43a91c..35860e99db 100644 --- a/src/resolve/resolved-dns-server.c +++ b/src/resolve/resolved-dns-server.c @@ -575,8 +575,7 @@ void dns_server_warn_downgrade(DnsServer *server) { "MESSAGE_ID=" SD_MESSAGE_DNSSEC_DOWNGRADE_STR, LOG_MESSAGE("Server %s does not support DNSSEC, downgrading to non-DNSSEC mode.", dns_server_string(server)), "DNS_SERVER=%s", dns_server_string(server), - "DNS_SERVER_FEATURE_LEVEL=%s", dns_server_feature_level_to_string(server->possible_feature_level), - NULL); + "DNS_SERVER_FEATURE_LEVEL=%s", dns_server_feature_level_to_string(server->possible_feature_level)); server->warned_downgrade = true; } From 2cda08fdf3e61725ca6dd07bafe7d31fb5c7e0ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 6 Jun 2018 14:55:31 +0200 Subject: [PATCH 2/2] resolved: reformat message about a revoked trust anchor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LOG_MESSAGE is just a wrapper, but it keeps the arguments indented together with the format string, so put the argument inside of the macro invocation. (No functional change.) Also use lowercase for "trust anchor" — it should either be all capitaled or not at all, and it's not a proper name, so let's make it all lowercase. Also, add a newline, to make the string more readable. "%s" can expand to something that is quite long. --- src/resolve/resolved-dns-trust-anchor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/resolve/resolved-dns-trust-anchor.c b/src/resolve/resolved-dns-trust-anchor.c index 21c04a59ae..69e3637330 100644 --- a/src/resolve/resolved-dns-trust-anchor.c +++ b/src/resolve/resolved-dns-trust-anchor.c @@ -630,8 +630,9 @@ static int dns_trust_anchor_remove_revoked(DnsTrustAnchor *d, DnsResourceRecord /* We found the key! Warn the user */ log_struct(LOG_WARNING, "MESSAGE_ID=" SD_MESSAGE_DNSSEC_TRUST_ANCHOR_REVOKED_STR, - LOG_MESSAGE("DNSSEC Trust anchor %s has been revoked. Please update the trust anchor, or upgrade your operating system."), - strna(dns_resource_record_to_string(rr)), + LOG_MESSAGE("DNSSEC trust anchor %s has been revoked.\n" + "Please update the trust anchor, or upgrade your operating system.", + strna(dns_resource_record_to_string(rr))), "TRUST_ANCHOR=%s", dns_resource_record_to_string(rr)); if (dns_answer_size(new_answer) <= 0) {