From 3cdf1d676bc5a2431a49036dd3f6412d6913aa2a Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Wed, 28 Oct 2015 10:06:45 -0200
Subject: details (avoid 'case' inside block + avoid using one variable for two
 roles)

---
 ldo.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'ldo.c')

diff --git a/ldo.c b/ldo.c
index 0e53d9ed..123c1194 100644
--- a/ldo.c
+++ b/ldo.c
@@ -1,5 +1,5 @@
 /*
-** $Id: ldo.c,v 2.140 2015/09/08 15:41:05 roberto Exp roberto $
+** $Id: ldo.c,v 2.141 2015/10/21 18:40:47 roberto Exp roberto $
 ** Stack and Call structure of Lua
 ** See Copyright Notice in lua.h
 */
@@ -321,14 +321,14 @@ static void tryfuncTM (lua_State *L, StkId func) {
 int luaD_precall (lua_State *L, StkId func, int nresults) {
   lua_CFunction f;
   CallInfo *ci;
-  int n;  /* number of arguments (Lua) or returns (C) */
   switch (ttype(func)) {
-    case LUA_TCCL: {  /* C closure */
+    case LUA_TCCL:  /* C closure */
       f = clCvalue(func)->f;
       goto Cfunc;
     case LUA_TLCF:  /* light C function */
       f = fvalue(func);
-     Cfunc:
+     Cfunc: {
+      int n;  /* number of returns */
       checkstackp(L, LUA_MINSTACK, func);  /* ensure minimum stack size */
       ci = next_ci(L);  /* now 'enter' new function */
       ci->nresults = nresults;
@@ -348,7 +348,7 @@ int luaD_precall (lua_State *L, StkId func, int nresults) {
     case LUA_TLCL: {  /* Lua function: prepare its call */
       StkId base;
       Proto *p = clLvalue(func)->p;
-      n = cast_int(L->top - func) - 1;  /* number of real arguments */
+      int n = cast_int(L->top - func) - 1;  /* number of real arguments */
       checkstackp(L, p->maxstacksize, func);
       for (; n < p->numparams; n++)
         setnilvalue(L->top++);  /* complete missing arguments */
-- 
cgit v1.2.3-55-g6feb