aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dirparse/parsecommon.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-12-14 14:48:12 -0500
committerNick Mathewson <nickm@torproject.org>2018-12-14 14:48:12 -0500
commit9dc53bc68f5e038c9531e3b12a58026d4007f652 (patch)
tree61271e1439c7af81737427b25090493e9cc9dc69 /src/feature/dirparse/parsecommon.c
parentf8dac5c900856494867996f60da848b0111aad35 (diff)
downloadtor-9dc53bc68f5e038c9531e3b12a58026d4007f652.tar.gz
tor-9dc53bc68f5e038c9531e3b12a58026d4007f652.zip
Remove a needless memset() in get_token_arguments()
I believe we originally added this for "just in case" safety, but it isn't actually needed -- we never copy uninitialized stack here. What's more, this one memset is showing up on our startup profiles, so we ought to remove it. Closes ticket 28852.
Diffstat (limited to 'src/feature/dirparse/parsecommon.c')
-rw-r--r--src/feature/dirparse/parsecommon.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/feature/dirparse/parsecommon.c b/src/feature/dirparse/parsecommon.c
index e00af0eea2..5280f2ed2f 100644
--- a/src/feature/dirparse/parsecommon.c
+++ b/src/feature/dirparse/parsecommon.c
@@ -169,7 +169,6 @@ get_token_arguments(memarea_t *area, directory_token_t *tok,
char *cp = mem;
int j = 0;
char *args[MAX_ARGS];
- memset(args, 0, sizeof(args));
while (*cp) {
if (j == MAX_ARGS)
return -1;