[Lldb-commits] [lldb] 6c87623 - [UserExpression] Clean up `return` after `else`.

Davide Italiano via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 3 16:52:17 PST 2020


Author: Davide Italiano
Date: 2020-01-03T16:52:10-08:00
New Revision: 6c87623615b3befdf62e3a5cd6c408a698f1c2d9

URL: https://github.com/llvm/llvm-project/commit/6c87623615b3befdf62e3a5cd6c408a698f1c2d9
DIFF: https://github.com/llvm/llvm-project/commit/6c87623615b3befdf62e3a5cd6c408a698f1c2d9.diff

LOG: [UserExpression] Clean up `return` after `else`.

Added: 
    

Modified: 
    lldb/source/Expression/UserExpression.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Expression/UserExpression.cpp b/lldb/source/Expression/UserExpression.cpp
index 9e3c8ad56af0..271bd9bb57aa 100644
--- a/lldb/source/Expression/UserExpression.cpp
+++ b/lldb/source/Expression/UserExpression.cpp
@@ -84,10 +84,9 @@ bool UserExpression::LockAndCheckContext(ExecutionContext &exe_ctx,
   if (m_address.IsValid()) {
     if (!frame_sp)
       return false;
-    else
-      return (0 == Address::CompareLoadAddress(m_address,
-                                               frame_sp->GetFrameCodeAddress(),
-                                               target_sp.get()));
+    return (Address::CompareLoadAddress(m_address,
+                                        frame_sp->GetFrameCodeAddress(),
+                                        target_sp.get()) == 0);
   }
 
   return true;


        


More information about the lldb-commits mailing list