Fix indentation and add braces to silence empty while loop body compiler warning.
This commit is contained in:
parent
aad52488ac
commit
821e82a069
|
@ -567,14 +567,14 @@ LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) {
|
|||
c = getc(lf.f);
|
||||
if (c == '#') { /* Unix exec. file? */
|
||||
lf.extraline = 1;
|
||||
while ((c = getc(lf.f)) != EOF && c != '\n') ; /* skip first line */
|
||||
while ((c = getc(lf.f)) != EOF && c != '\n'){} ; /* skip first line */
|
||||
if (c == '\n') c = getc(lf.f);
|
||||
}
|
||||
if (c == LUA_SIGNATURE[0] && filename) { /* binary file? */
|
||||
lf.f = freopen(filename, "rb", lf.f); /* reopen in binary mode */
|
||||
if (lf.f == NULL) return errfile(L, "reopen", fnameindex);
|
||||
/* skip eventual `#!...' */
|
||||
while ((c = getc(lf.f)) != EOF && c != LUA_SIGNATURE[0]) ;
|
||||
while ((c = getc(lf.f)) != EOF && c != LUA_SIGNATURE[0]){} ;
|
||||
lf.extraline = 0;
|
||||
}
|
||||
ungetc(c, lf.f);
|
||||
|
|
Loading…
Reference in New Issue