linux-user: don't zero a buffer twice
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>
This commit is contained in:
		
							parent
							
								
									61322e91a1
								
							
						
					
					
						commit
						e2cc3f6ebe
					
				| 
						 | 
					@ -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);
 | 
					    retval = lseek(bprm->fd, 0L, SEEK_SET);
 | 
				
			||||||
    if(retval >= 0) {
 | 
					    if(retval >= 0) {
 | 
				
			||||||
        retval = read(bprm->fd, bprm->buf, 128);
 | 
					        retval = read(bprm->fd, bprm->buf, 128);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue