Skip to content

Commit

Permalink
sparse: libstb/container: fix endian type for magic number
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stewartsmith authored and oohal committed Jul 19, 2019
1 parent 33753c9 commit 62ceded
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libstb/container.c
Expand Up @@ -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)
Expand Down

0 comments on commit 62ceded

Please sign in to comment.