Commit 2fec1e7b authored by Christian Lamparter's avatar Christian Lamparter Committed by Luis R. Rodriguez

reglib: fix memset usage

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: 's avatarChristian Lamparter <chunkeey@googlemail.com>
Signed-off-by: 's avatarLuis R. Rodriguez <mcgrof@do-not-panic.com>
parent 0f73f08f
...@@ -1127,7 +1127,7 @@ reglib_parse_country_simple(char *line, struct ieee80211_regdomain *rd) ...@@ -1127,7 +1127,7 @@ reglib_parse_country_simple(char *line, struct ieee80211_regdomain *rd)
char alpha2[2]; char alpha2[2];
int hits; int hits;
memset(rd, 0, sizeof(rd)); memset(rd, 0, sizeof(*rd));
memset(alpha2, 0, sizeof(alpha2)); memset(alpha2, 0, sizeof(alpha2));
memset(dfs_region_alpha, 0, sizeof(dfs_region_alpha)); 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) ...@@ -1149,7 +1149,7 @@ static int reglib_parse_country_dfs(char *line, struct ieee80211_regdomain *rd)
char alpha2[2]; char alpha2[2];
int hits; int hits;
memset(rd, 0, sizeof(rd)); memset(rd, 0, sizeof(*rd));
memset(alpha2, 0, sizeof(alpha2)); memset(alpha2, 0, sizeof(alpha2));
memset(dfs_region_alpha, 0, sizeof(dfs_region_alpha)); memset(dfs_region_alpha, 0, sizeof(dfs_region_alpha));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment