diff --git a/src/frontend/misccoms.c b/src/frontend/misccoms.c index c41806db4..4359ccf78 100644 --- a/src/frontend/misccoms.c +++ b/src/frontend/misccoms.c @@ -36,20 +36,14 @@ com_quit(wordlist *wl) struct plot *pl; int ncc = 0, npl = 0; char buf[64]; - bool noask; - noask = cp_getvar("noaskquit", CP_BOOL, NULL); + bool noask = + (wl && wl->wl_word && cieq(wl->wl_word, "noask")) || + cp_getvar("noaskquit", CP_BOOL, NULL); gr_clean(); cp_ccon(FALSE); - if(wl) - if(wl->wl_word) - if(cieq(wl->wl_word, "noask")) { - byemesg(); - exit(EXIT_NORMAL); - } - /* Make sure the guy really wants to quit. */ if (!ft_nutmeg && !noask) { for (cc = ft_circuits; cc; cc = cc->ci_next)