From 5436de5bab1a68582f0e305fcb6e8c9c82659ea2 Mon Sep 17 00:00:00 2001 From: rlar Date: Thu, 17 May 2012 19:20:51 +0200 Subject: [PATCH] misccoms.c, tiny rewrite --- src/frontend/misccoms.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/frontend/misccoms.c b/src/frontend/misccoms.c index 812459f43..73eb3a45b 100644 --- a/src/frontend/misccoms.c +++ b/src/frontend/misccoms.c @@ -82,17 +82,15 @@ com_quit(wordlist *wl) *buf = 'y'; } - if ((*buf == 'y') || (*buf == 'Y') || (*buf == '\n')) { -#ifdef EXPERIMENTAL_CODE - /* Destroy CKT when quit. Add by Gong Ding, gdiso@ustc.edu */ - for (cc = ft_circuits; cc; cc = cc->ci_next) - if(SIMinfo.deleteCircuit) - SIMinfo.deleteCircuit(cc->ci_ckt); -#endif - } - else { + if (!((*buf == 'y') || (*buf == 'Y') || (*buf == '\n'))) return; - } + +#ifdef EXPERIMENTAL_CODE + /* Destroy CKT when quit. Add by Gong Ding, gdiso@ustc.edu */ + for (cc = ft_circuits; cc; cc = cc->ci_next) + if(SIMinfo.deleteCircuit) + SIMinfo.deleteCircuit(cc->ci_ckt); +#endif } }