From: Mark Wooding Date: Sat, 12 May 2018 20:58:12 +0000 (+0100) Subject: server/keymgmt.c: Remove redundant error reports. X-Git-Tag: 1.5.0~30 X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/commitdiff_plain/d451c6cde8ac95000b7175fe8af4f1b6d40df3b9 server/keymgmt.c: Remove redundant error reports. Any I/O errors encountered while reading the key file will have been reported already. In the same terms. Previously, the final `die' message wasn't actually redundant, because the earlier warnings got swallowed if we were going to run as a daemon. It's obviously wrong that this happened, and the underlying cause has been fixed properly now, so this isn't a concern any more. --- diff --git a/server/keymgmt.c b/server/keymgmt.c index 00c32953..6ee65bcd 100644 --- a/server/keymgmt.c +++ b/server/keymgmt.c @@ -275,8 +275,6 @@ static int kh_reopen(keyhalf *kh) key_file *kf = CREATE(key_file); if (key_open(kf, kh->kr, KOPEN_READ, keymoan, kh)) { - a_warn("KEYMGMT", "%s-keyring", kh->kind, "%s", kh->kr, - "io-error", "?ERRNO", A_END); DESTROY(kf); return (-1); } @@ -307,8 +305,7 @@ static void kh_init(keyhalf *kh, const char *kr) sym_create(&kh->tab); kh->kf = 0; - if (kh_reopen(kh)) - die(EXIT_FAILURE, "failed to load %s keyring `%s'", kh->kind, kr); + if (kh_reopen(kh)) exit(EXIT_FAILURE); } /* --- @kh_load@ --- *