From 2ce91b08213c20b18bd75b87e8a75d2fdfcb6a6b Mon Sep 17 00:00:00 2001 From: rlar Date: Tue, 26 Dec 2017 15:15:15 +0100 Subject: [PATCH] pscopy(), pscopy_up(), expand spice_dstring_reinit() macro and inline the resulting spice_dstring_setlength() invocation --- src/frontend/numparam/mystring.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/frontend/numparam/mystring.c b/src/frontend/numparam/mystring.c index 66c34dc35..640ea4682 100644 --- a/src/frontend/numparam/mystring.c +++ b/src/frontend/numparam/mystring.c @@ -195,7 +195,8 @@ pscopy(SPICE_DSTRINGPTR dstr_p, const char *t, int leng) } else { - s_p = spice_dstring_reinit(dstr_p); + s_p = _spice_dstring_setlength(dstr_p, 0); + s_p[0] = '\0'; } @@ -228,7 +229,8 @@ pscopy_up(SPICE_DSTRINGPTR dstr_p, const char *t, int leng) } else { - s_p = spice_dstring_reinit(dstr_p); + s_p = _spice_dstring_setlength(dstr_p, 0); + s_p[0] = '\0'; }