Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6710e50 authored by Pavel Roskin's avatar Pavel Roskin Committed by Jeff Garzik
Browse files

[PATCH] hostap: use offsetof() instead of own equivalent



The original macros result in gcc 4.2 warning about "cast from pointer
to integer of different size" on 64-bit systems.

Use of offsetof() on fields in substructures is widespread throughout
the kernel code and should work whether offsetof() is defined using
__compiler_offsetof() or a cast.

Signed-off-by: default avatarPavel Roskin <proski@gnu.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 876c9d3a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -368,9 +368,9 @@ enum {

#define PRISM2_HOSTAPD_MAX_BUF_SIZE 1024
#define PRISM2_HOSTAPD_RID_HDR_LEN \
((int) (&((struct prism2_hostapd_param *) 0)->u.rid.data))
offsetof(struct prism2_hostapd_param, u.rid.data)
#define PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \
((int) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data))
offsetof(struct prism2_hostapd_param, u.generic_elem.data)

/* Maximum length for algorithm names (-1 for nul termination) used in ioctl()
 */