aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_util.c
diff options
context:
space:
mode:
authorYawning Angel <yawning@schwanenlied.me>2015-02-17 18:53:33 +0000
committerYawning Angel <yawning@schwanenlied.me>2015-02-17 18:53:33 +0000
commitcbd26157c52e27af16efcb474861eb4126085283 (patch)
treebd6705b51cf4dcda50715f734d3565a9806d3d50 /src/test/test_util.c
parentd038430a1409fbb28ea4d0b62654fc3cc7bb1f7a (diff)
downloadtor-cbd26157c52e27af16efcb474861eb4126085283.tar.gz
tor-cbd26157c52e27af16efcb474861eb4126085283.zip
Remove tor_strclear(), and replace previous calls with memwipe().
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r--src/test/test_util.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 9939bf4e3e..41dd9174d6 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -4111,26 +4111,6 @@ test_util_laplace(void *arg)
;
}
-static void
-test_util_strclear(void *arg)
-{
- static const char *vals[] = { "", "a", "abcdef", "abcdefgh", NULL };
- int i;
- char *v = NULL;
- (void)arg;
-
- for (i = 0; vals[i]; ++i) {
- size_t n;
- v = tor_strdup(vals[i]);
- n = strlen(v);
- tor_strclear(v);
- tt_assert(tor_mem_is_zero(v, n+1));
- tor_free(v);
- }
- done:
- tor_free(v);
-}
-
#define UTIL_LEGACY(name) \
{ #name, test_util_ ## name , 0, NULL, NULL }
@@ -4351,7 +4331,6 @@ struct testcase_t util_tests[] = {
UTIL_LEGACY(di_ops),
UTIL_TEST(round_to_next_multiple_of, 0),
UTIL_TEST(laplace, 0),
- UTIL_TEST(strclear, 0),
UTIL_TEST(find_str_at_start_of_line, 0),
UTIL_TEST(string_is_C_identifier, 0),
UTIL_TEST(asprintf, 0),