mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-27 00:51:50 +00:00
bloblist: Zero records when adding
It is convenient for bloblist to zero out the contents of a records when it is added. This saves the callers having to do it. Update the API accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
02247c1887
commit
b83994dec7
3 changed files with 30 additions and 4 deletions
|
@ -73,6 +73,9 @@ static int bloblist_addrec(uint tag, int size, struct bloblist_rec **recp)
|
|||
rec->hdr_size = sizeof(*rec);
|
||||
rec->size = size;
|
||||
rec->spare = 0;
|
||||
|
||||
/* Zero the record data */
|
||||
memset(rec + 1, '\0', rec->size);
|
||||
*recp = rec;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue