device.c, #15/19, make use of 'wl_find()'

This commit is contained in:
rlar 2017-06-10 10:50:25 +02:00
parent 20c303eb8b
commit 3eda944db5
1 changed files with 2 additions and 10 deletions

View File

@ -1210,16 +1210,8 @@ com_alter_common(wordlist *wl, int do_model)
wl = parent->wl_next;
/* Everything is ready, parsing of the wordlist starts here. */
words = wl;
while (words) {
p = words->wl_word;
eqword = words;
words = words->wl_next;
if (eq(p, "="))
break;
}
if (!words) {
eqword = wl_find("=", wl);
if (!eqword || !eqword->wl_next) {
fprintf(cp_err, "Error: no assignment found.\n");
fprintf(cp_err, "Cannot alter parameters.\n");
return;