diff options
author | Yawning Angel <yawning@schwanenlied.me> | 2015-02-17 18:53:33 +0000 |
---|---|---|
committer | Yawning Angel <yawning@schwanenlied.me> | 2015-02-17 18:53:33 +0000 |
commit | cbd26157c52e27af16efcb474861eb4126085283 (patch) | |
tree | bd6705b51cf4dcda50715f734d3565a9806d3d50 /src/common | |
parent | d038430a1409fbb28ea4d0b62654fc3cc7bb1f7a (diff) | |
download | tor-cbd26157c52e27af16efcb474861eb4126085283.tar.gz tor-cbd26157c52e27af16efcb474861eb4126085283.zip |
Remove tor_strclear(), and replace previous calls with memwipe().
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/util.c | 10 | ||||
-rw-r--r-- | src/common/util.h | 1 |
2 files changed, 0 insertions, 11 deletions
diff --git a/src/common/util.c b/src/common/util.c index 442d57a2cf..2c3a1a1019 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -771,16 +771,6 @@ fast_memcmpstart(const void *mem, size_t memlen, return fast_memcmp(mem, prefix, plen); } -/** Given a nul-terminated string s, set every character before the nul - * to zero. */ -void -tor_strclear(char *s) -{ - while (*s) { - *s++ = '\0'; - } -} - /** Return a pointer to the first char of s that is not whitespace and * not a comment, or to the terminating NUL if no such character exists. */ diff --git a/src/common/util.h b/src/common/util.h index ea774bd9bd..783c2a13db 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -209,7 +209,6 @@ int strcasecmpstart(const char *s1, const char *s2) ATTR_NONNULL((1,2)); int strcmpend(const char *s1, const char *s2) ATTR_NONNULL((1,2)); int strcasecmpend(const char *s1, const char *s2) ATTR_NONNULL((1,2)); int fast_memcmpstart(const void *mem, size_t memlen, const char *prefix); -void tor_strclear(char *s); void tor_strstrip(char *s, const char *strip) ATTR_NONNULL((1,2)); long tor_parse_long(const char *s, int base, long min, |