summaryrefslogtreecommitdiff
path: root/iwinfo_lua.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-05-19 18:54:58 +0200
committerJo-Philipp Wich <jow@openwrt.org>2015-05-19 18:54:58 +0200
commite8a1e7d224918ba23fe0cd125e70907cb31aea31 (patch)
tree8a28b33406dc57ec736fb37c62f23178e15878f7 /iwinfo_lua.c
parent5aef442328121483ac0b7925c0422e92788c9e7b (diff)
downloadiwinfo-e8a1e7d224918ba23fe0cd125e70907cb31aea31.tar.gz
Fix -Wall -Wpedantic warnings
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'iwinfo_lua.c')
-rw-r--r--iwinfo_lua.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/iwinfo_lua.c b/iwinfo_lua.c
index 21d6bbc..1a91001 100644
--- a/iwinfo_lua.c
+++ b/iwinfo_lua.c
@@ -597,7 +597,7 @@ static char * iwinfo_L_country_lookup(char *buf, int len, int iso3166)
static int iwinfo_L_countrylist(lua_State *L, int (*func)(const char *, char *, int *))
{
- int len, i, j;
+ int len, i;
char rv[IWINFO_BUFSIZE], alpha2[3];
char *ccode;
const char *ifname = luaL_checkstring(L, 1);
@@ -608,7 +608,7 @@ static int iwinfo_L_countrylist(lua_State *L, int (*func)(const char *, char *,
if (!(*func)(ifname, rv, &len))
{
- for (l = IWINFO_ISO3166_NAMES, j = 1; l->iso3166; l++)
+ for (l = IWINFO_ISO3166_NAMES, i = 1; l->iso3166; l++)
{
if ((ccode = iwinfo_L_country_lookup(rv, len, l->iso3166)) != NULL)
{
@@ -626,7 +626,7 @@ static int iwinfo_L_countrylist(lua_State *L, int (*func)(const char *, char *,
lua_pushstring(L, l->name);
lua_setfield(L, -2, "name");
- lua_rawseti(L, -2, j++);
+ lua_rawseti(L, -2, i++);
}
}
}