From: Victor Julien Date: Mon, 27 Jul 2020 08:16:29 +0000 (+0200) Subject: pfring: fix compile warning X-Git-Tag: suricata-6.0.0-beta1~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5234%2Fhead;p=thirdparty%2Fsuricata.git pfring: fix compile warning --- diff --git a/src/runmode-pfring.c b/src/runmode-pfring.c index e0e52a5c81..528d850760 100644 --- a/src/runmode-pfring.c +++ b/src/runmode-pfring.c @@ -264,10 +264,13 @@ static void *ParsePfringConfig(const char *iface) } } } else { - if (StringParseUint16(&pfconf->threads, 10, 0, (const char *)threadsstr) < 0) { + uint16_t threads = 0; + if (StringParseUint16(&threads, 10, 0, (const char *)threadsstr) < 0) { SCLogWarning(SC_ERR_INVALID_VALUE, "Invalid value for " "pfring.threads: '%s'. Resetting to 1.", threadsstr); pfconf->threads = 1; + } else { + pfconf->threads = threads; } } }