From: Mark Wooding Date: Sat, 12 May 2018 21:20:36 +0000 (+0100) Subject: server/keymgmt.c (kh_reopen): Promote the happy path. X-Git-Tag: 1.5.0~32 X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/commitdiff_plain/cc807016aa6f35f6f9bbb03f75a31ba5045a262c server/keymgmt.c (kh_reopen): Promote the happy path. --- diff --git a/server/keymgmt.c b/server/keymgmt.c index 7386408f..00c32953 100644 --- a/server/keymgmt.c +++ b/server/keymgmt.c @@ -279,14 +279,13 @@ static int kh_reopen(keyhalf *kh) "io-error", "?ERRNO", A_END); DESTROY(kf); return (-1); - } else { - if (kh->kf) { - key_close(kh->kf); - DESTROY(kh->kf); - } - kh->kf = kf; - return (0); } + if (kh->kf) { + key_close(kh->kf); + DESTROY(kh->kf); + } + kh->kf = kf; + return (0); } /* --- @kh_init@ --- *