findsubname(), duplicate function epilogue and return early

This commit is contained in:
rlar 2017-11-22 22:48:38 +01:00
parent 4986df1baf
commit f0cead24b8
1 changed files with 5 additions and 0 deletions

View File

@ -204,6 +204,11 @@ findsubname(dico_t *dico, SPICE_DSTRINGPTR dstr_p)
}
entry = entrynb(dico, spice_dstring_value(&name));
found = entry && (entry->tp == NUPA_SUBCKT);
if (found) {
if (found && (h < ls))
pscopy(dstr_p, s, 0, h);
return;
}
}
}