Browse Source

pscopy(), pscopy_up(), use _spice_dstring_setlength() return value

instead of invoking spice_dstring_value()
pre-master-46
rlar 8 years ago
parent
commit
e21d48a267
  1. 6
      src/frontend/numparam/mystring.c

6
src/frontend/numparam/mystring.c

@ -185,8 +185,7 @@ pscopy(SPICE_DSTRINGPTR dstr_p, const char *t, int leng)
if (leng > stop)
leng = stop;
_spice_dstring_setlength(dstr_p, leng);
s_p = spice_dstring_value(dstr_p);
s_p = _spice_dstring_setlength(dstr_p, leng);
for (i = 0; i < leng; i++)
s_p[i] = t[i];
@ -219,8 +218,7 @@ pscopy_up(SPICE_DSTRINGPTR dstr_p, const char *t, int leng)
if (leng > stop)
leng = stop;
_spice_dstring_setlength(dstr_p, leng);
s_p = spice_dstring_value(dstr_p);
s_p = _spice_dstring_setlength(dstr_p, leng);
for (i = 0; i < leng; i++)
s_p[i] = toupper_c(t[i]);

Loading…
Cancel
Save