doc: rockchip: Remove list of supported boards
[oweals/u-boot.git] / common / bloblist.c
index 3599ffa75c0d0599bd02806c5ee19e00f4c6fd85..99501951e0c068a57d3bfb8d988f96dbb85b1cc0 100644 (file)
@@ -59,11 +59,10 @@ static int bloblist_addrec(uint tag, int size, struct bloblist_rec **recp)
        struct bloblist_rec *rec;
        int new_alloced;
 
-       new_alloced = hdr->alloced + sizeof(*rec) +
-                       ALIGN(size, BLOBLIST_ALIGN);
+       new_alloced = hdr->alloced + sizeof(*rec) + ALIGN(size, BLOBLIST_ALIGN);
        if (new_alloced >= hdr->size) {
                log(LOGC_BLOBLIST, LOGL_ERR,
-                   "Failed to allocate %x bytes size=%x, need size>=%x\n",
+                   "Failed to allocate %x bytes size=%x, need size=%x\n",
                    size, hdr->size, new_alloced);
                return log_msg_ret("bloblist add", -ENOSPC);
        }
@@ -74,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;