]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
fix CID 1257762: Logically dead code(DEADCODE)
authorDIALLO David <diallo@et.esiea.fr>
Mon, 15 Dec 2014 15:45:39 +0000 (16:45 +0100)
committerDIALLO David <diallo@et.esiea.fr>
Mon, 15 Dec 2014 15:45:39 +0000 (16:45 +0100)
src/app-layer-modbus.c

index 7d23bcacc402b9b3476e4f5ea37a60adf8298348..d2518b5313d32a32501eacf4f0dcbaab6bd342f5 100644 (file)
@@ -829,7 +829,7 @@ static int ModbusParseDiagnosticRequest(ModbusTransaction   *tx,
     if (tx->subFunction != MODBUS_SUBFUNC_QUERY_DATA) {
         switch (tx->subFunction) {
             case MODBUS_SUBFUNC_RESTART_COM:
-                if ((data != 0x00) || (data != 0xFF00))
+                if ((data != 0x00) && (data != 0xFF00))
                     goto error;
                 break;