mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-08-22 13:57:32 +02:00
inp_search_closing_paren(), drop found_paren, its always true
This commit is contained in:
@@ -1808,21 +1808,18 @@ inp_search_closing_paren1(char *s)
|
|||||||
static char *
|
static char *
|
||||||
inp_search_for_closing_paren2(char *s)
|
inp_search_for_closing_paren2(char *s)
|
||||||
{
|
{
|
||||||
bool found_paren = FALSE;
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
// assert(*s == '(')
|
// assert(*s == '(')
|
||||||
while (*s != '\0') {
|
while (*s != '\0') {
|
||||||
if (*s == '(') {
|
if (*s == '(')
|
||||||
count++;
|
count++;
|
||||||
found_paren = TRUE;
|
|
||||||
}
|
|
||||||
if (*s == ')')
|
if (*s == ')')
|
||||||
count--;
|
count--;
|
||||||
s++;
|
s++;
|
||||||
if (found_paren && count == 0)
|
if (count == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (found_paren && count != 0)
|
if (count != 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user