Skip to content

Commit 9598c22

Browse files
frankjaahuth
authored andcommitted
pc-bios: s390x: Make u32 ptr check explicit
Let's make it a bit more clear that we check the full 64 bits to fit into the 32 we return. Signed-off-by: Janosch Frank <[email protected]> Suggested-by: David Hildenbrand <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Reviewed-by: Thomas Huth <[email protected]> Message-Id: <[email protected]> Signed-off-by: Thomas Huth <[email protected]>
1 parent 78182ae commit 9598c22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pc-bios/s390-ccw/helper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/* Avoids compiler warnings when casting a pointer to a u32 */
2020
static inline uint32_t ptr2u32(void *ptr)
2121
{
22-
IPL_assert((uint64_t)ptr <= 0xffffffff, "ptr2u32: ptr too large");
22+
IPL_assert((uint64_t)ptr <= 0xffffffffull, "ptr2u32: ptr too large");
2323
return (uint32_t)(uint64_t)ptr;
2424
}
2525

0 commit comments

Comments
 (0)