server/keymgmt.c: Remove redundant error reports.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 12 May 2018 20:58:12 +0000 (21:58 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 25 Jan 2019 12:10:31 +0000 (12:10 +0000)
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.

server/keymgmt.c

index 00c3295..6ee65bc 100644 (file)
@@ -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@ --- *