From: Victor Julien Date: Thu, 27 Oct 2016 09:55:28 +0000 (+0200) Subject: DNP3: minor cleanup X-Git-Tag: suricata-3.2RC1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2391%2Fhead;p=thirdparty%2Fsuricata.git DNP3: minor cleanup --- 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; } }