diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-11-30 10:42:49 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-11-30 10:42:49 -0200 |
| commit | e21b26a964774e29f24e5f6ae97808fdb5bce9d5 (patch) | |
| tree | f512c9e2843fdc12c5bba13e17346633893b3dc3 /ltable.c | |
| parent | 0f388193b3d00571126abadfd4dc9bf02ea17b24 (diff) | |
| download | lua-e21b26a964774e29f24e5f6ae97808fdb5bce9d5.tar.gz lua-e21b26a964774e29f24e5f6ae97808fdb5bce9d5.tar.bz2 lua-e21b26a964774e29f24e5f6ae97808fdb5bce9d5.zip | |
avoid 'return' "to avoid warnings"
Diffstat (limited to 'ltable.c')
| -rw-r--r-- | ltable.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltable.c,v 2.65 2011/09/30 12:45:27 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 2.66 2011/11/28 17:25:48 roberto Exp roberto $ |
| 3 | ** Lua tables (hash) | 3 | ** Lua tables (hash) |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -141,7 +141,7 @@ static int findindex (lua_State *L, Table *t, StkId key) { | |||
| 141 | return i-1; /* yes; that's the index (corrected to C) */ | 141 | return i-1; /* yes; that's the index (corrected to C) */ |
| 142 | else { | 142 | else { |
| 143 | Node *n = mainposition(t, key); | 143 | Node *n = mainposition(t, key); |
| 144 | do { /* check whether `key' is somewhere in the chain */ | 144 | for (;;) { /* check whether `key' is somewhere in the chain */ |
| 145 | /* key may be dead already, but it is ok to use it in `next' */ | 145 | /* key may be dead already, but it is ok to use it in `next' */ |
| 146 | if (luaV_rawequalobj(gkey(n), key) || | 146 | if (luaV_rawequalobj(gkey(n), key) || |
| 147 | (ttisdeadkey(gkey(n)) && iscollectable(key) && | 147 | (ttisdeadkey(gkey(n)) && iscollectable(key) && |
| @@ -151,9 +151,9 @@ static int findindex (lua_State *L, Table *t, StkId key) { | |||
| 151 | return i + t->sizearray; | 151 | return i + t->sizearray; |
| 152 | } | 152 | } |
| 153 | else n = gnext(n); | 153 | else n = gnext(n); |
| 154 | } while (n); | 154 | if (n == NULL) |
| 155 | luaG_runerror(L, "invalid key to " LUA_QL("next")); /* key not found */ | 155 | luaG_runerror(L, "invalid key to " LUA_QL("next")); /* key not found */ |
| 156 | return 0; /* to avoid warnings */ | 156 | } |
| 157 | } | 157 | } |
| 158 | } | 158 | } |
| 159 | 159 | ||
