nupa_subcktcall(), simplify

This commit is contained in:
rlar 2016-05-16 21:43:17 +02:00
parent e4a2106cfe
commit 07112d62fb
1 changed files with 2 additions and 2 deletions

View File

@ -1654,13 +1654,13 @@ nupa_subcktcall(dico_t *dico, char *s, char * const x, char * const inst_name)
}
char * const u_p = spice_dstring_value(&ustr);
if (u_p[0]) {
if (*u_p) {
char * const idlist_p = spice_dstring_value(&idlist);
char *dollar = strchr(idlist_p, '$');
if (dollar) {
/* replace dollar with expression string u */
pscopy(&vstr, idlist_p, 0, (int) (dollar - idlist_p));
sadd(&vstr, spice_dstring_value(&ustr));
sadd(&vstr, u_p);
sadd(&vstr, dollar + 1);
scopyd(&idlist, &vstr);
}