mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-08-22 05:47:42 +02:00
device.c, #15/19, make use of 'wl_find()'
This commit is contained in:
+2
-10
@@ -1210,16 +1210,8 @@ com_alter_common(wordlist *wl, int do_model)
|
|||||||
wl = parent->wl_next;
|
wl = parent->wl_next;
|
||||||
|
|
||||||
/* Everything is ready, parsing of the wordlist starts here. */
|
/* Everything is ready, parsing of the wordlist starts here. */
|
||||||
words = wl;
|
eqword = wl_find("=", wl);
|
||||||
while (words) {
|
if (!eqword || !eqword->wl_next) {
|
||||||
p = words->wl_word;
|
|
||||||
eqword = words;
|
|
||||||
words = words->wl_next;
|
|
||||||
if (eq(p, "="))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!words) {
|
|
||||||
fprintf(cp_err, "Error: no assignment found.\n");
|
fprintf(cp_err, "Error: no assignment found.\n");
|
||||||
fprintf(cp_err, "Cannot alter parameters.\n");
|
fprintf(cp_err, "Cannot alter parameters.\n");
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user