From 24b18e47bdfbeba72f5b20180958c7ddeb67ba4d Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 19 Oct 2018 15:41:35 +0200 Subject: [PATCH] pfring: minor cleanups --- src/runmode-pfring.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/runmode-pfring.c b/src/runmode-pfring.c index ef0b490aba..9c107b74ee 100644 --- a/src/runmode-pfring.c +++ b/src/runmode-pfring.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2010 Open Information Security Foundation +/* Copyright (C) 2007-2018 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -375,7 +375,7 @@ static void *ParsePfringConfig(const char *iface) return pfconf; } -static int PfringConfigGeThreadsCount(void *conf) +static int PfringConfigGetThreadsCount(void *conf) { PfringIfaceConfig *pfp = (PfringIfaceConfig *)conf; return pfp->threads; @@ -383,14 +383,13 @@ static int PfringConfigGeThreadsCount(void *conf) static int PfringConfLevel(void) { - const char *def_dev; + const char *def_dev = NULL; /* 1.0 config should return a string */ if (ConfGet("pfring.interface", &def_dev) != 1) { return PFRING_CONF_V2; } else { return PFRING_CONF_V1; } - return PFRING_CONF_V2; } static int GetDevAndParser(const char **live_dev, ConfigIfaceParserFunc *parser) @@ -441,7 +440,7 @@ int RunModeIdsPfringAutoFp(void) } ret = RunModeSetLiveCaptureAutoFp(tparser, - PfringConfigGeThreadsCount, + PfringConfigGetThreadsCount, "ReceivePfring", "DecodePfring", thread_name_autofp, live_dev); @@ -478,7 +477,7 @@ int RunModeIdsPfringSingle(void) } ret = RunModeSetLiveCaptureSingle(tparser, - PfringConfigGeThreadsCount, + PfringConfigGetThreadsCount, "ReceivePfring", "DecodePfring", thread_name_single, live_dev); @@ -515,7 +514,7 @@ int RunModeIdsPfringWorkers(void) } ret = RunModeSetLiveCaptureWorkers(tparser, - PfringConfigGeThreadsCount, + PfringConfigGetThreadsCount, "ReceivePfring", "DecodePfring", thread_name_workers, live_dev);