mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-03 01:46:38 +00:00
fix unused vars warning in digwatch.cpp
This commit is contained in:
parent
31a0065c3c
commit
f71de57a90
@ -111,7 +111,7 @@ void do_inspect(sinsp* inspector,
|
|||||||
//
|
//
|
||||||
int digwatch_init(int argc, char **argv)
|
int digwatch_init(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int result;
|
int result = EXIT_SUCCESS;
|
||||||
sinsp* inspector = NULL;
|
sinsp* inspector = NULL;
|
||||||
digwatch_rules* rules = NULL;
|
digwatch_rules* rules = NULL;
|
||||||
digwatch_formats* formats = NULL;
|
digwatch_formats* formats = NULL;
|
||||||
@ -120,7 +120,7 @@ int digwatch_init(int argc, char **argv)
|
|||||||
int long_index = 0;
|
int long_index = 0;
|
||||||
string lua_main_filename;
|
string lua_main_filename;
|
||||||
string lua_dir = DIGWATCH_INSTALLATION_DIR;
|
string lua_dir = DIGWATCH_INSTALLATION_DIR;
|
||||||
lua_State* ls;
|
lua_State* ls = NULL;
|
||||||
|
|
||||||
static struct option long_options[] =
|
static struct option long_options[] =
|
||||||
{
|
{
|
||||||
@ -147,7 +147,6 @@ int digwatch_init(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
case 'h':
|
case 'h':
|
||||||
usage();
|
usage();
|
||||||
result = EXIT_SUCCESS;
|
|
||||||
goto exit;
|
goto exit;
|
||||||
case 'm':
|
case 'm':
|
||||||
lua_main_filename = optarg;
|
lua_main_filename = optarg;
|
||||||
@ -242,7 +241,10 @@ exit:
|
|||||||
delete inspector;
|
delete inspector;
|
||||||
}
|
}
|
||||||
|
|
||||||
lua_close(ls);
|
if(ls)
|
||||||
|
{
|
||||||
|
lua_close(ls);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user