chore: typos and miscellanea

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
Leonardo Di Donato
2019-09-16 21:26:59 +00:00
committed by Leo Di Donato
parent c96f096821
commit 836094b28e
6 changed files with 7 additions and 15 deletions

View File

@@ -267,7 +267,6 @@ int falco_formats::format_event (lua_State *ls)
}
int falco_formats::resolve_tokens(lua_State *ls)
{
if (!lua_isstring(ls, -1) ||
@@ -275,12 +274,10 @@ int falco_formats::resolve_tokens(lua_State *ls)
lua_pushstring(ls, "Invalid arguments passed to resolve_tokens()");
lua_error(ls);
}
gen_event* evt = (gen_event*)lua_topointer(ls, 1);
const char *source = (char *) lua_tostring(ls, 2); // TODO(fntlnz, leodido): do we need this one?
const char *format = (char *) lua_tostring(ls, 3);
gen_event* evt = (gen_event*) lua_topointer(ls, 1);
const char *format = (char *) lua_tostring(ls, 2);
string sformat = format;
map<string,string> values;
s_formatters->resolve_tokens((sinsp_evt *)evt, sformat, values);