[Lldb-commits] [lldb] r317145 - [Core] Comparison for unsigned >= 0 is redundant. NFCI.

Davide Italiano via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 1 16:49:23 PDT 2017


Author: davide
Date: Wed Nov  1 16:49:23 2017
New Revision: 317145

URL: http://llvm.org/viewvc/llvm-project?rev=317145&view=rev
Log:
[Core] Comparison for unsigned >= 0 is redundant. NFCI.

Modified:
    lldb/trunk/source/Core/ArchSpec.cpp

Modified: lldb/trunk/source/Core/ArchSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ArchSpec.cpp?rev=317145&r1=317144&r2=317145&view=diff
==============================================================================
--- lldb/trunk/source/Core/ArchSpec.cpp (original)
+++ lldb/trunk/source/Core/ArchSpec.cpp Wed Nov  1 16:49:23 2017
@@ -516,7 +516,7 @@ static const CoreDefinition *FindCoreDef
 }
 
 static inline const CoreDefinition *FindCoreDefinition(ArchSpec::Core core) {
-  if (core >= 0 && core < llvm::array_lengthof(g_core_definitions))
+  if (core < llvm::array_lengthof(g_core_definitions))
     return &g_core_definitions[core];
   return nullptr;
 }




More information about the lldb-commits mailing list