summaryrefslogtreecommitdiffstats
path: root/include/compressed-dtb.h
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-07-13 11:57:29 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-07-14 10:27:41 +0200
commit845524484c298bf173d682b48dd456b147ad5a61 (patch)
treead4842aebb8d65d49c03cff48699da1c21806fbb /include/compressed-dtb.h
parent92262f8709c5de9776d45ab49aca38ee41413b2c (diff)
downloadbarebox-845524484c298bf173d682b48dd456b147ad5a61.tar.gz
barebox-845524484c298bf173d682b48dd456b147ad5a61.tar.xz
pbl: compressed-dtb: use flexible array member to access data
While data = compressed_dtb + 1 has the equivalent effect of skipping over the struct barebox_boarddata_compressed_dtb header, using a flexible array member aids code readability, so use that instead. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220713095730.1878941-5-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/compressed-dtb.h')
-rw-r--r--include/compressed-dtb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/compressed-dtb.h b/include/compressed-dtb.h
index 1ba98a7e2b..3359d1ee11 100644
--- a/include/compressed-dtb.h
+++ b/include/compressed-dtb.h
@@ -10,6 +10,7 @@ struct barebox_boarddata_compressed_dtb {
u32 magic;
u32 datalen;
u32 datalen_uncompressed;
+ u8 data[];
};
static inline bool blob_is_compressed_fdt(const void *blob)