[4/5] linux-user: don't zero a buffer twice

Submitted by Riku Voipio on Oct. 16, 2009, 2:02 p.m.

Details

Message ID e2cc3f6ebe65f98171e07c6097c0bfa9171f6f0e.1255701565.git.riku.voipio@iki.fi
State New
Headers show

Commit Message

Riku Voipio Oct. 16, 2009, 2:02 p.m.
From: Paul Bolle <pebolle@tiscali.nl>

prepare_binprm() zeroes bprm->buf. That buffer is already zeroed in
main() and hasn't been touched since so that is not necessary.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
---
 linux-user/linuxload.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Patch hide | download patch | download mbox

diff --git a/linux-user/linuxload.c b/linux-user/linuxload.c
index 4091bdc..2d778a2 100644
--- a/linux-user/linuxload.c
+++ b/linux-user/linuxload.c
@@ -96,7 +96,6 @@  static int prepare_binprm(struct linux_binprm *bprm)
 	}
     }
 
-    memset(bprm->buf, 0, sizeof(bprm->buf));
     retval = lseek(bprm->fd, 0L, SEEK_SET);
     if(retval >= 0) {
         retval = read(bprm->fd, bprm->buf, 128);