simplify while loop for subckt diode and bjt models

This commit is contained in:
dwarning 2021-05-02 08:32:35 +02:00 committed by Holger Vogt
parent c8db059144
commit 4ca4b43801
1 changed files with 2 additions and 6 deletions

View File

@ -1932,11 +1932,9 @@ devmodtranslate(struct card *s, char *subname, wordlist * const orig_modnames)
if (name == NULL) { if (name == NULL) {
name = copy(""); /* allow 'tfree' */ name = copy(""); /* allow 'tfree' */
} else { } else {
found = 0; for (;;) {
while (!found) {
wlsub = wl_find(name, orig_modnames); wlsub = wl_find(name, orig_modnames);
if (wlsub) { if (wlsub) {
found = 1;
break; break;
} else { } else {
bxx_printf(&buffer, "%s ", name); bxx_printf(&buffer, "%s ", name);
@ -2089,11 +2087,9 @@ devmodtranslate(struct card *s, char *subname, wordlist * const orig_modnames)
if (name == NULL) { if (name == NULL) {
name = copy(""); /* allow 'tfree' */ name = copy(""); /* allow 'tfree' */
} else { } else {
found = 0; for (;;) {
while (!found) {
wlsub = wl_find(name, orig_modnames); wlsub = wl_find(name, orig_modnames);
if (wlsub) { if (wlsub) {
found = 1;
break; break;
} else { } else {
bxx_printf(&buffer, "%s ", name); bxx_printf(&buffer, "%s ", name);