From 2b54b1ab1a796ef89426f021319c11ff22710947 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 18 Feb 2012 22:44:11 -0600 Subject: Nathan McSween convinced me compilers that inline memset() can optimize the bzero case pretty well. --- toys/toysh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/toysh.c') diff --git a/toys/toysh.c b/toys/toysh.c index b2dd2bba..23b88c3d 100644 --- a/toys/toysh.c +++ b/toys/toysh.c @@ -291,7 +291,7 @@ static void run_pipeline(struct pipeline *line) // This fakes lots of what toybox_main() does. memcpy(&temp, &toys, sizeof(struct toy_context)); - bzero(&toys, sizeof(struct toy_context)); + memset(&toys, 0, sizeof(struct toy_context)); toy_init(tl, cmd->argv); tl->toy_main(); cmd->pid = toys.exitval; -- cgit v1.2.3