diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-08 11:53:12 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-08 11:53:12 +0200 |
commit | e50482f994b6ebcce864a412111d376e99205cdb (patch) | |
tree | ff3192c6aaf213c4922521bed988e4ed4147f537 /app/dynstring/dynstring.c | |
parent | d3897ce090dbeb220ed2c782f095597e417cf3cc (diff) | |
parent | b623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff) |
Update upstream source from tag 'upstream/5.2.0Beta2.1'
Update to upstream version '5.2.0Beta2.1'
with Debian dir 1576f25f4c1496abfed44af31ead67d32c7be650
Diffstat (limited to 'app/dynstring/dynstring.c')
-rw-r--r-- | app/dynstring/dynstring.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/dynstring/dynstring.c b/app/dynstring/dynstring.c index eb7b2c5..fd50a0b 100644 --- a/app/dynstring/dynstring.c +++ b/app/dynstring/dynstring.c @@ -115,6 +115,23 @@ void DynStringClear(DynString *s) DynStringRealloc(s); } + +/** +* Clear the dynamic string contents without changing memory allocation. +* +* \param s IN the dynamic string +*/ + +void DynStringReset(DynString *s) +{ + /* Not a string? */ + if (isnas(s)) + { + return; + } + s->size = 0; +} + /** * Resize the string for a minimum number of bytes. In order to optimize memory usage the * actually allocated block of memory can be larger than the requested size. |