Skip to content

Commit 5451d76

Browse files
committed
[lldb] Fix redundant condition in compression type check (NFC)
The `else if` condition for checking `m_compression_type` is redundant as it matches with a previous `if` condition, making the expression always false. Reported by cppcheck as a possible cut-and-paste error. Caught by cppcheck - lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp:543:35: style: Expression is always false because 'else if' condition matches previous condition at line 535. [multiCondition] Fix llvm#91222
1 parent ac40463 commit 5451d76

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,6 @@ bool GDBRemoteCommunication::DecompressPacket() {
540540
scratchbuf_size = compression_decode_scratch_buffer_size (COMPRESSION_ZLIB);
541541
else if (m_compression_type == CompressionType::LZMA)
542542
scratchbuf_size = compression_decode_scratch_buffer_size (COMPRESSION_LZMA);
543-
else if (m_compression_type == CompressionType::LZFSE)
544-
scratchbuf_size = compression_decode_scratch_buffer_size (COMPRESSION_LZFSE);
545543
if (scratchbuf_size > 0) {
546544
m_decompression_scratch = (void*) malloc (scratchbuf_size);
547545
m_decompression_scratch_type = m_compression_type;

0 commit comments

Comments
 (0)