]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Make conf_test local. Simplify if/else to if.
authorXavier Lange <xrlange@gmail.com>
Tue, 20 Mar 2012 21:02:49 +0000 (14:02 -0700)
committerVictor Julien <victor@inliniac.net>
Fri, 23 Mar 2012 17:28:10 +0000 (18:28 +0100)
src/suricata.c

index 388a4b62ee071d18936b9d120546760a5f6a3fa5..fcbcf6bd1ef10d3d40b461372513360ff9c6027a 100644 (file)
@@ -220,9 +220,6 @@ intmax_t max_pending_packets;
 /** set caps or not */
 int sc_set_caps;
 
-/** test configuration and exit */
-int conf_test = 0;
-
 int RunmodeIsUnittests(void) {
     if (run_mode == RUNMODE_UNITTEST)
         return 1;
@@ -629,6 +626,7 @@ int main(int argc, char **argv)
     char pcap_dev[128];
     char *sig_file = NULL;
     int sig_file_exclusive = FALSE;
+    int conf_test = 0;
     char *conf_filename = NULL;
     char *pid_filename = NULL;
 #ifdef UNITTESTS
@@ -1713,10 +1711,10 @@ int main(int argc, char **argv)
     if(conf_test == 1){
         SCLogInfo("Configuration provided was successfully loaded. Exiting.");
         exit(EXIT_SUCCESS);
-    } else {
-        RunModeDispatch(run_mode, runmode_custom_mode, de_ctx);
     }
 
+    RunModeDispatch(run_mode, runmode_custom_mode, de_ctx);
+
 #ifdef __SC_CUDA_SUPPORT__
     if (PatternMatchDefaultMatcher() == MPM_B2G_CUDA) {
         /* start the dispatcher thread for this module */