qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: riku . voipio
Subject: [Qemu-devel] [PATCH 4/5] linux-user: don't zero a buffer twice
Date: Fri, 16 Oct 2009 17:02:30 +0300

From: Paul Bolle <address@hidden>

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 <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
 linux-user/linuxload.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

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);
-- 
1.6.2.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]