aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/fstring.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-02 22:01:02 +0200
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-02 22:01:02 +0200
commit8fce0b58686e4cb4f0212db40e52cc0d7a0bffa0 (patch)
tree6c9bfb462f2c5bb720b113767464523b44bbf4a8 /src/libutil/fstring.h
parent4ea9e0293d8490d3a2775a4391518f61537d56ab (diff)
downloadrspamd-8fce0b58686e4cb4f0212db40e52cc0d7a0bffa0.tar.gz
rspamd-8fce0b58686e4cb4f0212db40e52cc0d7a0bffa0.zip
[Minor] Add macro to clear rspamd fstring
Diffstat (limited to 'src/libutil/fstring.h')
-rw-r--r--src/libutil/fstring.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libutil/fstring.h b/src/libutil/fstring.h
index db8b49085..0bd9a271d 100644
--- a/src/libutil/fstring.h
+++ b/src/libutil/fstring.h
@@ -81,6 +81,8 @@ rspamd_fstring_t *rspamd_fstring_append_chars (rspamd_fstring_t *str,
*/
void rspamd_fstring_erase (rspamd_fstring_t *str, gsize pos, gsize len);
+#define rspamd_fstring_clear(s) rspamd_fstring_erase(s, 0, s->len)
+
/**
* Convert fixed string to a zero terminated string. This string should be
* freed by a caller