mirror of
https://github.com/lunarmodules/luafilesystem.git
synced 2026-07-24 20:33:06 +00:00
Get rid of goto in lfs_g_setmode
This commit is contained in:
@@ -354,11 +354,10 @@ static int lfs_g_setmode (lua_State *L, FILE *f, int arg) {
|
|||||||
for (i = 0; modenames[i] != NULL; i++) {
|
for (i = 0; modenames[i] != NULL; i++) {
|
||||||
if (mode[i] == res) {
|
if (mode[i] == res) {
|
||||||
lua_pushstring(L, modenames[i]);
|
lua_pushstring(L, modenames[i]);
|
||||||
goto exit;
|
return 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
exit:
|
|
||||||
return 2;
|
return 2;
|
||||||
} else {
|
} else {
|
||||||
int en = errno;
|
int en = errno;
|
||||||
|
|||||||
Reference in New Issue
Block a user