From 6d5a4ceefec3edd5be6a745edd831dcd0d94000e Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Thu, 7 Nov 2013 01:11:36 +0100 Subject: [PATCH] * grub-core/net/bootp.c (OFFSET_OF): Explicitly cast to grub_size_t. --- ChangeLog | 4 ++++ grub-core/net/bootp.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 00c154ed7..5be787e99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-11-07 Vladimir Serbinenko + + * grub-core/net/bootp.c (OFFSET_OF): Explicitly cast to grub_size_t. + 2013-11-07 Vladimir Serbinenko * grub-core/net/bootp.c (set_env_limn_ro): Make pointer const. diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c index 76fee9183..ed159418a 100644 --- a/grub-core/net/bootp.c +++ b/grub-core/net/bootp.c @@ -159,7 +159,7 @@ parse_dhcp_vendor (const char *name, const void *vend, int limit, int *mask) } } -#define OFFSET_OF(x, y) ((grub_uint8_t *)((y)->x) - (grub_uint8_t *)(y)) +#define OFFSET_OF(x, y) ((grub_size_t)((grub_uint8_t *)((y)->x) - (grub_uint8_t *)(y))) struct grub_net_network_level_interface * grub_net_configure_by_dhcp_ack (const char *name,