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>
diff --git a/common/bloblist.c b/common/bloblist.c
index 3d0fbbf..9950195 100644
--- a/common/bloblist.c
+++ b/common/bloblist.c
@@ -73,6 +73,9 @@
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;