about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael McConville <mmcconville@mykolab.com>2015-09-14 15:29:55 -0400
committerMichael McConville <mmcconville ~a~ mykolab ~d~ com>2015-09-14 18:12:45 -0400
commit2eafd19dfadd035214ae7b17a91436650730a28e (patch)
tree27e2ff04e34e34b3bb73dacee7f66498f7c6fd89
parent2d4ae52cbdca96d4dd6d5a009e4a5ef87a279df0 (diff)
downloadrust-2eafd19dfadd035214ae7b17a91436650730a28e.tar.gz
rust-2eafd19dfadd035214ae7b17a91436650730a28e.zip
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.
-rw-r--r--src/rt/rust_builtin.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/rt/rust_builtin.c b/src/rt/rust_builtin.c
index cf497438a6b..af15bda4c3d 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;