diff options
author | Pavel Roskin <proski@gnu.org> | 2007-02-18 20:44:06 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-04-28 11:00:55 -0400 |
commit | c6710e50f6b976dead878e143c568d4f8b068c7c (patch) | |
tree | 81acaf6b817d1e956f340c39e6d6b4b82939d488 /drivers/net/wireless/hostap | |
parent | 876c9d3aeb989cf1961f2c228d309ba5dcfb1172 (diff) |
[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: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/hostap')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/hostap/hostap_common.h b/drivers/net/wireless/hostap/hostap_common.h index 01624005d808..b31e6a05f23c 100644 --- a/drivers/net/wireless/hostap/hostap_common.h +++ b/drivers/net/wireless/hostap/hostap_common.h | |||
@@ -368,9 +368,9 @@ enum { | |||
368 | 368 | ||
369 | #define PRISM2_HOSTAPD_MAX_BUF_SIZE 1024 | 369 | #define PRISM2_HOSTAPD_MAX_BUF_SIZE 1024 |
370 | #define PRISM2_HOSTAPD_RID_HDR_LEN \ | 370 | #define PRISM2_HOSTAPD_RID_HDR_LEN \ |
371 | ((int) (&((struct prism2_hostapd_param *) 0)->u.rid.data)) | 371 | offsetof(struct prism2_hostapd_param, u.rid.data) |
372 | #define PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \ | 372 | #define PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \ |
373 | ((int) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data)) | 373 | offsetof(struct prism2_hostapd_param, u.generic_elem.data) |
374 | 374 | ||
375 | /* Maximum length for algorithm names (-1 for nul termination) used in ioctl() | 375 | /* Maximum length for algorithm names (-1 for nul termination) used in ioctl() |
376 | */ | 376 | */ |