diff options
author | Simon Glass | 2020-01-27 08:49:52 -0700 |
---|---|---|
committer | Simon Glass | 2020-02-05 19:33:46 -0700 |
commit | b83994dec7addcd5fecd0bfd2f734223eb0462f0 (patch) | |
tree | faa8ddaaaf7aa2632f89a96006c3e5a27e03ac35 /common | |
parent | 02247c1887312e5b4b367e4fb12122381b1424bc (diff) |
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 3d0fbbf67d3..99501951e0c 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; |