commandline: minor formatting fixes

pull/5361/head
Victor Julien 5 years ago
parent 9efb936697
commit 71297f575f

@ -1478,17 +1478,15 @@ static TmEcode ParseCommandLine(int argc, char** argv, SCInstance *suri)
" to receive packets using --dag."); " to receive packets using --dag.");
return TM_ECODE_FAILED; return TM_ECODE_FAILED;
#endif /* HAVE_DAG */ #endif /* HAVE_DAG */
} } else if (strcmp((long_opts[option_index]).name, "napatech") == 0) {
else if (strcmp((long_opts[option_index]).name, "napatech") == 0) {
#ifdef HAVE_NAPATECH #ifdef HAVE_NAPATECH
suri->run_mode = RUNMODE_NAPATECH; suri->run_mode = RUNMODE_NAPATECH;
#else #else
SCLogError(SC_ERR_NAPATECH_REQUIRED, "libntapi and a Napatech adapter are required" SCLogError(SC_ERR_NAPATECH_REQUIRED, "libntapi and a Napatech adapter are required"
" to capture packets using --napatech."); " to capture packets using --napatech.");
return TM_ECODE_FAILED; return TM_ECODE_FAILED;
#endif /* HAVE_NAPATECH */ #endif /* HAVE_NAPATECH */
} } else if (strcmp((long_opts[option_index]).name, "pcap-buffer-size") == 0) {
else if(strcmp((long_opts[option_index]).name, "pcap-buffer-size") == 0) {
#ifdef HAVE_PCAP_SET_BUFF #ifdef HAVE_PCAP_SET_BUFF
if (ConfSetFinal("pcap.buffer-size", optarg) != 1) { if (ConfSetFinal("pcap.buffer-size", optarg) != 1) {
fprintf(stderr, "ERROR: Failed to set pcap-buffer-size.\n"); fprintf(stderr, "ERROR: Failed to set pcap-buffer-size.\n");
@ -1498,12 +1496,10 @@ static TmEcode ParseCommandLine(int argc, char** argv, SCInstance *suri)
SCLogError(SC_ERR_NO_PCAP_SET_BUFFER_SIZE, "The version of libpcap you have" SCLogError(SC_ERR_NO_PCAP_SET_BUFFER_SIZE, "The version of libpcap you have"
" doesn't support setting buffer size."); " doesn't support setting buffer size.");
#endif /* HAVE_PCAP_SET_BUFF */ #endif /* HAVE_PCAP_SET_BUFF */
} } else if (strcmp((long_opts[option_index]).name, "build-info") == 0) {
else if(strcmp((long_opts[option_index]).name, "build-info") == 0) {
suri->run_mode = RUNMODE_PRINT_BUILDINFO; suri->run_mode = RUNMODE_PRINT_BUILDINFO;
return TM_ECODE_OK; return TM_ECODE_OK;
} } else if (strcmp((long_opts[option_index]).name, "windivert-forward") == 0) {
else if(strcmp((long_opts[option_index]).name, "windivert-forward") == 0) {
#ifdef WINDIVERT #ifdef WINDIVERT
if (suri->run_mode == RUNMODE_UNKNOWN) { if (suri->run_mode == RUNMODE_UNKNOWN) {
suri->run_mode = RUNMODE_WINDIVERT; suri->run_mode = RUNMODE_WINDIVERT;

Loading…
Cancel
Save