diff options
author | Christian Lamparter <chunkeey@googlemail.com> | 2013-11-11 20:39:50 +0100 |
---|---|---|
committer | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2013-11-20 13:12:54 +0100 |
commit | 2fec1e7b70c033dbf73f446c31e954ee17fae6df (patch) | |
tree | 1fb731fb3441508b5991df35772cda760f1429ea | |
parent | 0f73f08f09abb7ac8bb8dc542178de513f3554bc (diff) | |
download | crda-2fec1e7b70c033dbf73f446c31e954ee17fae6df.tar.gz |
reglib: fix memset usagev3.13
gcc-4.8 fails to compile reglib due to:
reglib.c:1133:22: error: argument to ‘sizeof’ in ‘memset’ call is
the same expression as the destination; did you mean
to dereference it? [-Werror=sizeof-pointer-memaccess]
memset(rd, 0, sizeof(rd));
^
reglib.c:1155:22: error: argument to ‘sizeof’ in... (same as above)
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
-rw-r--r-- | reglib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1127,7 +1127,7 @@ reglib_parse_country_simple(char *line, struct ieee80211_regdomain *rd) char alpha2[2]; int hits; - memset(rd, 0, sizeof(rd)); + memset(rd, 0, sizeof(*rd)); memset(alpha2, 0, sizeof(alpha2)); memset(dfs_region_alpha, 0, sizeof(dfs_region_alpha)); @@ -1149,7 +1149,7 @@ static int reglib_parse_country_dfs(char *line, struct ieee80211_regdomain *rd) char alpha2[2]; int hits; - memset(rd, 0, sizeof(rd)); + memset(rd, 0, sizeof(*rd)); memset(alpha2, 0, sizeof(alpha2)); memset(dfs_region_alpha, 0, sizeof(dfs_region_alpha)); |