aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass2020-01-27 08:49:52 -0700
committerSimon Glass2020-02-05 19:33:46 -0700
commitb83994dec7addcd5fecd0bfd2f734223eb0462f0 (patch)
treefaa8ddaaaf7aa2632f89a96006c3e5a27e03ac35 /common
parent02247c1887312e5b4b367e4fb12122381b1424bc (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.c3
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;