From 2c061e63944fdcbff6e3491b003ed26287070aec Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 20 Mar 2015 06:43:54 +0100 Subject: [PATCH] wiphy: Fix compiler warning with sizeof function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CC src/wiphy.o src/wiphy.c: In function ‘eapol_read’: src/wiphy.c:172:24: error: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to remove the addressof? [-Werror=sizeof-pointer-memaccess] memset(&sll, 0, sizeof(&sll)); ^ --- src/wiphy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wiphy.c b/src/wiphy.c index 8a56ace4..3b1f6c0e 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -169,7 +169,7 @@ static bool eapol_read(struct l_io *io, void *user_data) ssize_t bytes; uint8_t frame[2304]; /* IEEE Std 802.11 ch. 8.2.3 */ - memset(&sll, 0, sizeof(&sll)); + memset(&sll, 0, sizeof(sll)); sll_len = sizeof(sll); bytes = recvfrom(fd, frame, sizeof(frame), 0,