We want to be able to call ParseCommandLine from library users, but
currently library users don't have access to the `suricata` instance
type. Since this var is used other places as a global, use the global
one in ParseCommandLine as well.
Not ideal, but isolating SCInstance to a non-global will be another
challenge on its own.
extern int g_skip_prefilter;
-static TmEcode ParseCommandLine(int argc, char** argv, SCInstance *suri)
+static TmEcode ParseCommandLine(int argc, char **argv)
{
+ SCInstance *suri = &suricata;
int opt;
int dump_config = 0;
void SuricataInit(int argc, char **argv)
{
- if (ParseCommandLine(argc, argv, &suricata) != TM_ECODE_OK) {
+ if (ParseCommandLine(argc, argv) != TM_ECODE_OK) {
exit(EXIT_FAILURE);
}