mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02: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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user