From 5a58281e7b149ad1f5fc3100ac621b7a6fd5e47a Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 30 Sep 2012 21:57:22 +0200 Subject: [PATCH] com_spec(), use for(;;) loops --- src/frontend/spec.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/frontend/spec.c b/src/frontend/spec.c index ebe5e86d8..c50d7fcd8 100644 --- a/src/frontend/spec.c +++ b/src/frontend/spec.c @@ -166,36 +166,34 @@ com_spec(wordlist *wl) } } - pn = ft_getpnames(wl, TRUE); - names = pn; + names = ft_getpnames(wl, TRUE); vlist = NULL; ngood = 0; - while (pn) { + for (pn = names; pn; pn = pn->pn_next) { vec = ft_evaluate(pn); - pn = pn->pn_next; - while (vec) { + for (; vec; vec = vec->v_link2) { + if (vec->v_length != tlen) { fprintf(cp_err, "Error: lengths don't match: %d, %d\n", vec->v_length, tlen); - vec = vec->v_link2; continue; } + if (!isreal(vec)) { - fprintf(cp_err, "Error: %s isn't real!\n", - vec->v_name); - vec = vec->v_link2; + fprintf(cp_err, "Error: %s isn't real!\n", vec->v_name); continue; } + if (vec->v_type == SV_TIME) { - vec = vec->v_link2; continue; } + if (!vlist) vlist = vec; else lv->v_link2 = vec; + lv = vec; - vec = vec->v_link2; ngood++; } }