Project

General

Profile

Actions

Bug #1336

closed

modbus: CID 1257762: Logically dead code (DEADCODE)

Added by David DIALLO almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Low
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

*** CID 1257762:  Logically dead code  (DEADCODE)
/src/app-layer-modbus.c: 834 in ModbusParseDiagnosticRequest()
828
829         if (tx->subFunction != MODBUS_SUBFUNC_QUERY_DATA) {
830             switch (tx->subFunction) {
831                 case MODBUS_SUBFUNC_RESTART_COM:
832                     if ((data != 0x00) || (data != 0xFF00))
833                         goto error;
     CID 1257762:  Logically dead code  (DEADCODE)
     Execution cannot reach this statement: "break;".
834                     break;
835
836                 case MODBUS_SUBFUNC_CHANGE_DELIMITER:
837                     if ((data & 0xFF) != 0x00)
838                         goto error;
839                     break;
Actions

Also available in: Atom PDF