Actions
Bug #3453
closedcoverity: CID 1456680: Incorrect expression (IDENTICAL_BRANCHES) (4.1.x)
Affected Versions:
Effort:
Difficulty:
Label:
Description
*** CID 1456680: Incorrect expression (IDENTICAL_BRANCHES) /src/app-layer-modbus.c: 280 in ModbusSetTxDetectFlags() 274 return tx->logged; 275 } 276 277 static void ModbusSetTxDetectFlags(void *vtx, uint8_t dir, uint64_t flags) 278 { 279 ModbusTransaction *tx = (ModbusTransaction *)vtx; >>> CID 1456680: Incorrect expression (IDENTICAL_BRANCHES) >>> The same code is executed regardless of whether "dir & 4" is true, because the 'then' and 'else' branches are identical. Should one of the branches be modified, or the entire 'if' statement replaced? 280 if (dir & STREAM_TOSERVER) { 281 tx->detect_flags_ts = flags; 282 } else { 283 tx->detect_flags_ts = flags; 284 } 285 }
Updated by Victor Julien almost 5 years ago
- Copied from Bug #3434: coverity: CID 1456680: Incorrect expression (IDENTICAL_BRANCHES) added
Updated by Victor Julien almost 5 years ago
- Status changed from Assigned to Closed
Actions