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

instead of invoking spice_dstring_value()
This commit is contained in:
rlar 2017-12-26 15:16:13 +01:00
parent 2ce91b0821
commit e21d48a267
1 changed files with 2 additions and 4 deletions

View File

@ -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]);