cbfstool: Fill memory allocated in create_cbfs_file() with 0xff

This should improve programming speed a bit.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4975 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Peter Stuge 2009-12-06 12:14:39 +00:00
parent 1a76ebe2a2
commit f4aca1da48
1 changed files with 1 additions and 0 deletions

View File

@ -279,6 +279,7 @@ void *create_cbfs_file(const char *filename, void *data, uint32_t * datasize,
headersize); headersize);
exit(1); exit(1);
} }
memset(newdata, 0xff, *datasize + headersize);
struct cbfs_file *nextfile = (struct cbfs_file *)newdata; struct cbfs_file *nextfile = (struct cbfs_file *)newdata;
strncpy(nextfile->magic, "LARCHIVE", 8); strncpy(nextfile->magic, "LARCHIVE", 8);
nextfile->len = htonl(*datasize); nextfile->len = htonl(*datasize);