From e8ebfb115e64fd9fd0b25d2f87e29820e1e09d97 Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 10 Jun 2017 09:56:37 +0200 Subject: [PATCH] device.c, #13/19, drop artificial rewind to the beginning of the list --- src/frontend/device.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/frontend/device.c b/src/frontend/device.c index 1e31fb362..f60ce22d6 100644 --- a/src/frontend/device.c +++ b/src/frontend/device.c @@ -1170,7 +1170,6 @@ com_alter_common(wordlist *wl, int do_model) } } - wl2 = parent->wl_next; if (!wl) { /* no equal sign found, probably a pre3f4 input format 'alter device value' @@ -1207,14 +1206,10 @@ com_alter_common(wordlist *wl, int do_model) /* add the '=' */ wlin = wlin->wl_prev; wlin = wl_append(wlin, wl_cons(copy("="), wl_chop_rest(wlin))); - /* step back until 'alter' or 'altermod' is found, - then move one step forward */ - while (!ciprefix("alter", wlin->wl_word)) //while (!ciprefix(wlin->wl_word, "alter")) - wlin = wlin->wl_prev; - wlin = wlin->wl_next; - wl2 = wlin; } + wl2 = parent->wl_next; + /* Everything is ready, parsing of the wordlist starts here. */ words = wl2; while (words) {