From 4ca4b43801e8dd2b639a728bd741776b3206c05a Mon Sep 17 00:00:00 2001 From: dwarning Date: Sun, 2 May 2021 08:32:35 +0200 Subject: [PATCH] simplify while loop for subckt diode and bjt models --- src/frontend/subckt.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/frontend/subckt.c b/src/frontend/subckt.c index d4eaf7aa9..10d8163b9 100644 --- a/src/frontend/subckt.c +++ b/src/frontend/subckt.c @@ -1932,11 +1932,9 @@ devmodtranslate(struct card *s, char *subname, wordlist * const orig_modnames) if (name == NULL) { name = copy(""); /* allow 'tfree' */ } else { - found = 0; - while (!found) { + for (;;) { wlsub = wl_find(name, orig_modnames); if (wlsub) { - found = 1; break; } else { bxx_printf(&buffer, "%s ", name); @@ -2089,11 +2087,9 @@ devmodtranslate(struct card *s, char *subname, wordlist * const orig_modnames) if (name == NULL) { name = copy(""); /* allow 'tfree' */ } else { - found = 0; - while (!found) { + for (;;) { wlsub = wl_find(name, orig_modnames); if (wlsub) { - found = 1; break; } else { bxx_printf(&buffer, "%s ", name);