]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cbfs: Drop unnecessary cast in file_cbfs_fill_cache()
authorSimon Glass <sjg@chromium.org>
Mon, 15 Mar 2021 05:00:17 +0000 (18:00 +1300)
committerSimon Glass <sjg@chromium.org>
Sat, 27 Mar 2021 00:59:37 +0000 (13:59 +1300)
The results of malloc() are a void * and so this cast is unnecessary. Drop
it.

Signed-off-by: Simon Glass <sjg@chromium.org>
fs/cbfs/cbfs.c

index 443a148e3f1001f88efab9c102b3b3972a3a5dd0..415ea28b871d36f95cecf7ee1b3ba46cbb36a39e 100644 (file)
@@ -202,8 +202,7 @@ static int file_cbfs_fill_cache(struct cbfs_priv *priv, int size, int align)
                int used;
                int ret;
 
-               node = (struct cbfs_cachenode *)
-                               malloc(sizeof(struct cbfs_cachenode));
+               node = malloc(sizeof(struct cbfs_cachenode));
                if (!node)
                        return -ENOMEM;
                ret = file_cbfs_next_file(priv, start, size, align, node,