Skip to content

Commit 2eafd19

Browse files
mmccoMichael McConville
authored and
Michael McConville
committed
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.
1 parent 2d4ae52 commit 2eafd19

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/rt/rust_builtin.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,6 @@ int rust_get_argv_zero(void* p, size_t* sz)
328328
return -1;
329329
}
330330

331-
memset(p, 0, len);
332331
memcpy(p, argv[0], len);
333332
free(argv);
334333
return 0;

0 commit comments

Comments
 (0)