aboutsummaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-11-08 12:50:11 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-11-08 12:50:11 +0000
commitd40f2b204b78ace5c2c9c3007887571ca5a2ec11 (patch)
tree979cef9340fd0ae688e6a11d01a61bdc856bedaf /buffer.c
parentMerged /contrib/alon/BETA21@778 (diff)
downloadopenvpn-d40f2b204b78ace5c2c9c3007887571ca5a2ec11.tar.xz
Added ENABLE_INLINE_FILES feature.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@784 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/buffer.c b/buffer.c
index cfff06e..3b856bc 100644
--- a/buffer.c
+++ b/buffer.c
@@ -461,6 +461,20 @@ string_alloc (const char *str, struct gc_arena *gc)
}
/*
+ * Erase all characters in a string
+ */
+void
+string_clear (char *str)
+{
+ if (str)
+ {
+ const int len = strlen (str);
+ if (len > 0)
+ memset (str, 0, len);
+ }
+}
+
+/*
* Allocate a string inside a buffer
*/
struct buffer