From da5f10827b62503d55de8fd1ebecd168aefbc839 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 6 Apr 2015 11:17:13 +0200 Subject: [PATCH] CLEANUP: lua: rename variable "sc" for struct hlua_smp It's unclear where this name comes from, but better rename it now to "hsmp" to be in line with the rest of the code. --- src/hlua.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/hlua.c b/src/hlua.c index 67308d889..75395c6be 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -2836,7 +2836,7 @@ static int hlua_converters_new(lua_State *L, struct hlua_txn *txn, int stringsaf */ __LJMP static int hlua_run_sample_conv(lua_State *L) { - struct hlua_smp *sc; + struct hlua_smp *hsmp; struct sample_conv *conv; struct arg args[ARGM_NBARGS + 1]; int i; @@ -2846,7 +2846,7 @@ __LJMP static int hlua_run_sample_conv(lua_State *L) conv = (struct sample_conv *)lua_touserdata(L, lua_upvalueindex(1)); /* Get traditionnal arguments. */ - sc = MAY_LJMP(hlua_checkconverters(L, 1)); + hsmp = MAY_LJMP(hlua_checkconverters(L, 1)); /* Get extra arguments. */ for (i = 0; i < lua_gettop(L) - 2; i++) { @@ -2857,7 +2857,7 @@ __LJMP static int hlua_run_sample_conv(lua_State *L) args[i].type = ARGT_STOP; /* Check arguments. */ - MAY_LJMP(hlua_lua2arg_check(L, 3, args, conv->arg_mask, sc->p)); + MAY_LJMP(hlua_lua2arg_check(L, 3, args, conv->arg_mask, hsmp->p)); /* Run the special args checker. */ if (conv->val_args && !conv->val_args(args, conv, "", 0, NULL)) { @@ -2884,8 +2884,8 @@ __LJMP static int hlua_run_sample_conv(lua_State *L) } /* Run the sample conversion process. */ - if (!conv->process(sc->s, args, &smp, conv->private)) { - if (sc->stringsafe) + if (!conv->process(hsmp->s, args, &smp, conv->private)) { + if (hsmp->stringsafe) lua_pushstring(L, ""); else lua_pushnil(L); @@ -2893,7 +2893,7 @@ __LJMP static int hlua_run_sample_conv(lua_State *L) } /* Convert the returned sample in lua value. */ - if (sc->stringsafe) + if (hsmp->stringsafe) hlua_smp2lua_str(L, &smp); else hlua_smp2lua(L, &smp);