From 1639dfa36e363097583a6e766bb90a15d42a0555 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 27 Jul 2020 10:16:29 +0200 Subject: [PATCH] pfring: fix compile warning --- src/runmode-pfring.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } } }