diff options
author | Simon Glass <sjg@chromium.org> | 2020-01-27 18:49:52 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-02-06 05:33:46 +0300 |
commit | b83994dec7addcd5fecd0bfd2f734223eb0462f0 (patch) | |
tree | faa8ddaaaf7aa2632f89a96006c3e5a27e03ac35 /common | |
parent | 02247c1887312e5b4b367e4fb12122381b1424bc (diff) | |
download | u-boot-b83994dec7addcd5fecd0bfd2f734223eb0462f0.tar.xz |
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>
Diffstat (limited to 'common')
-rw-r--r-- | common/bloblist.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/bloblist.c b/common/bloblist.c index 3d0fbbf67d..99501951e0 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -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; |