From 2eafd19dfadd035214ae7b17a91436650730a28e Mon Sep 17 00:00:00 2001 From: Michael McConville Date: Mon, 14 Sep 2015 15:29:55 -0400 Subject: [PATCH] Remove a needless memset(). It's okay that we don't append NUL because len is actually one more than the length of argv[0]. However, this is precarious and should probably be replaced with more robust logic. --- src/rt/rust_builtin.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/rt/rust_builtin.c b/src/rt/rust_builtin.c index cf497438a6b75..af15bda4c3d4a 100644 --- a/src/rt/rust_builtin.c +++ b/src/rt/rust_builtin.c @@ -328,7 +328,6 @@ int rust_get_argv_zero(void* p, size_t* sz) return -1; } - memset(p, 0, len); memcpy(p, argv[0], len); free(argv); return 0;