]> Git Repo - qemu.git/commitdiff
linux-user: don't zero a buffer twice
authorPaul Bolle <[email protected]>
Fri, 2 Oct 2009 12:10:04 +0000 (14:10 +0200)
committerRiku Voipio <[email protected]>
Fri, 16 Oct 2009 11:36:36 +0000 (14:36 +0300)
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 <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
linux-user/linuxload.c

index 4091bdccccd873f946e9cd3649d3fdf51ed34513..2d778a2cedf78f3c55fed1bab952f828ad46529b 100644 (file)
@@ -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);
This page took 0.025811 seconds and 4 git commands to generate.