Browse Source

device.c, #3/19, move some code up

pre-master-46
rlar 9 years ago
parent
commit
3baaa57d18
  1. 9
      src/frontend/device.c

9
src/frontend/device.c

@ -1163,6 +1163,9 @@ com_alter_common(wordlist *wl, int do_model)
if (strlen(argument) == 1) { if (strlen(argument) == 1) {
step = -1; step = -1;
wl2 = wlin; wl2 = wlin;
/* step back in the wordlist, if we have moved forward, to catch 'm1' */
for (i = step; i > 0; i--)
wl2 = wl2->wl_prev;
} else if (strlen(argument) > 1) { } else if (strlen(argument) > 1) {
wl2 = NULL; wl2 = NULL;
if (eqptr[1]) if (eqptr[1])
@ -1172,6 +1175,9 @@ com_alter_common(wordlist *wl, int do_model)
wl2 = wl_cons(copy_substring(argument, eqptr), wl2); wl2 = wl_cons(copy_substring(argument, eqptr), wl2);
/* combine wordlists into wl2, free wl */ /* combine wordlists into wl2, free wl */
wl_splice(wl, wl2); wl_splice(wl, wl2);
/* step back in the wordlist, if we have moved forward, to catch 'm1' */
for (i = step; i > 0; i--)
wl2 = wl2->wl_prev;
} }
break; break;
} }
@ -1184,9 +1190,6 @@ com_alter_common(wordlist *wl, int do_model)
} }
if (eqfound) { if (eqfound) {
/* step back in the wordlist, if we have moved forward, to catch 'm1' */
for (i = step; i > 0; i--)
wl2 = wl2->wl_prev;
} else { } else {
/* no equal sign found, probably a pre3f4 input format /* no equal sign found, probably a pre3f4 input format
'alter device value' 'alter device value'

Loading…
Cancel
Save