From 5dc9c1b8748fea884bf83dc376972fac00f4c007 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 27 Oct 2016 11:55:28 +0200 Subject: [PATCH] DNP3: minor cleanup --- src/detect-dnp3.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/detect-dnp3.c b/src/detect-dnp3.c index f70c87f7ff..5cdad9565f 100644 --- a/src/detect-dnp3.c +++ b/src/detect-dnp3.c @@ -186,14 +186,13 @@ static int DetectDNP3FuncParseFunctionCode(char *str, uint8_t *fc) if (ByteExtractStringUint8(fc, 10, strlen(str), str) >= 0) { return 1; } - else { - /* Lookup by name. */ - for (size_t i = 0; - i < sizeof(DNP3FunctionNameMap) / sizeof(DNP3Mapping); i++) { - if (strcasecmp(str, DNP3FunctionNameMap[i].name) == 0) { - *fc = DNP3FunctionNameMap[i].value; - return 1; - } + + /* Lookup by name. */ + for (size_t i = 0; + i < sizeof(DNP3FunctionNameMap) / sizeof(DNP3Mapping); i++) { + if (strcasecmp(str, DNP3FunctionNameMap[i].name) == 0) { + *fc = DNP3FunctionNameMap[i].value; + return 1; } } -- 2.47.2