mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
tools: kwbimage: Do not cast const pointers to non-const pointers
Avoid casting const to non-const. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
1a8e6b63e2
commit
1a0e52f50a
1 changed files with 2 additions and 2 deletions
|
@ -235,11 +235,11 @@ static inline int opt_hdr_v1_valid_size(const struct opt_hdr_v1 *ohdr,
|
|||
{
|
||||
uint32_t ohdr_size;
|
||||
|
||||
if ((void *)(ohdr + 1) > mhdr_end)
|
||||
if ((const void *)(ohdr + 1) > mhdr_end)
|
||||
return 0;
|
||||
|
||||
ohdr_size = opt_hdr_v1_size(ohdr);
|
||||
if (ohdr_size < 8 || (void *)((uint8_t *)ohdr + ohdr_size) > mhdr_end)
|
||||
if (ohdr_size < 8 || (const void *)((const uint8_t *)ohdr + ohdr_size) > mhdr_end)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue