diff options
author | Stewart Smith <stewart@linux.ibm.com> | 2019-07-18 16:51:17 +1000 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2019-07-19 17:45:50 +1000 |
commit | 62ceded30471a8490ec9fe6db153a61c43f64bd3 (patch) | |
tree | 704aa7d789bec31e8c44cd712f5cdf2df4ff347a | |
parent | 33753c98ddb464c97a6e406dc64fe9dd5d3714f9 (diff) | |
download | skiboot-62ceded30471a8490ec9fe6db153a61c43f64bd3.zip skiboot-62ceded30471a8490ec9fe6db153a61c43f64bd3.tar.gz skiboot-62ceded30471a8490ec9fe6db153a61c43f64bd3.tar.bz2 |
sparse: libstb/container: fix endian type for magic number
libstb/container.c:38:28: warning: incorrect type in argument 1 (different base types)
libstb/container.c:38:28: expected restricted beint32_t [usertype] be_val
libstb/container.c:38:28: got unsigned int [usertype]
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
-rw-r--r-- | libstb/container.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libstb/container.c b/libstb/container.c index a720fbb..5287c94 100644 --- a/libstb/container.c +++ b/libstb/container.c @@ -35,7 +35,7 @@ uint32_t stb_payload_magic(const void *buf, size_t size) if (!stb_is_container(buf, size)) return 0; p = (uint8_t*) buf; - return be32_to_cpu(*(uint32_t*)(p+SECURE_BOOT_HEADERS_SIZE)); + return be32_to_cpu(*(be32*)(p+SECURE_BOOT_HEADERS_SIZE)); } uint64_t stb_sw_payload_size(const void *buf, size_t size) |