From 9b7205f5dd4658980adf61968344e51b18122e90 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 7 Apr 2021 10:16:54 +0100 Subject: [PATCH] coredump: fix style nits Follow-up for 95f71807733 --- src/coredump/coredumpctl.c | 4 ++-- src/coredump/stacktrace.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c index 3418753a31b..0ba218a39db 100644 --- a/src/coredump/coredumpctl.c +++ b/src/coredump/coredumpctl.c @@ -729,9 +729,9 @@ static int print_info(FILE *file, sd_journal *j, bool need_space) { _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; r = json_parse(pkgmeta_json, 0, &v, NULL, NULL); - if (r < 0) { + if (r < 0) log_warning_errno(r, "json_parse on %s failed, ignoring: %m", pkgmeta_json); - } else { + else { const char *module_name; JsonVariant *module_json; diff --git a/src/coredump/stacktrace.c b/src/coredump/stacktrace.c index cc31c7b03cf..9cf2be33654 100644 --- a/src/coredump/stacktrace.c +++ b/src/coredump/stacktrace.c @@ -241,12 +241,12 @@ static int module_callback(Dwfl_Module *mod, void **userdata, const char *name, * The build-id is easy, as libdwfl parses it during the dwfl_core_file_report() call and * stores it separately in an internal library struct. */ id_len = dwfl_module_build_id(mod, &id, &id_vaddr); - if (id_len <= 0) { + if (id_len <= 0) /* If we don't find a build-id, note it in the journal message, and try * anyway to find the package metadata. It's unlikely to have the latter * without the former, but there's no hard rule. */ - fprintf(c->f, "Found module %s without build-id\n", name); - } else { + fprintf(c->f, "Found module %s without build-id.\n", name); + else { _cleanup_free_ char *id_hex = NULL, *id_hex_prefixed = NULL; id_hex = hexmem(id, id_len); -- 2.47.3