From d7ba17cc0248f052e7765014de2497de56db1ee1 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Thu, 24 Aug 2017 20:52:11 +0100 Subject: [PATCH] refactor nntp setup Reorder the code so that NewsServer is only set once. --- init.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/init.c b/init.c index ea7826246..546340efb 100644 --- a/init.c +++ b/init.c @@ -4218,6 +4218,12 @@ void mutt_init(int skip_sys_rc, struct ListHead *commands) #endif #ifdef USE_NNTP + if ((p = getenv("NNTPSERVER"))) + { + FREE(&NewsServer); + NewsServer = safe_strdup(p); + } + else { FILE *f = NULL; char *c = NULL; @@ -4236,11 +4242,6 @@ void mutt_init(int skip_sys_rc, struct ListHead *commands) fclose(f); } } - if ((p = getenv("NNTPSERVER"))) - { - FREE(&NewsServer); - NewsServer = safe_strdup(p); - } #endif if ((p = getenv("MAIL"))) -- 2.40.0