Get rid of goto in lfs_g_setmode

This commit is contained in:
Peter Melnichenko
2016-04-25 15:33:12 +03:00
parent 95d946e0fe
commit 695def20ef

View File

@@ -354,11 +354,10 @@ static int lfs_g_setmode (lua_State *L, FILE *f, int arg) {
for (i = 0; modenames[i] != NULL; i++) {
if (mode[i] == res) {
lua_pushstring(L, modenames[i]);
goto exit;
return 2;
}
}
lua_pushnil(L);
exit:
return 2;
} else {
int en = errno;