From: Richard Russon Date: Thu, 24 Aug 2017 19:52:11 +0000 (+0100) Subject: refactor nntp setup X-Git-Tag: neomutt-20170907~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d7ba17cc0248f052e7765014de2497de56db1ee1;p=neomutt refactor nntp setup Reorder the code so that NewsServer is only set once. --- 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")))