Skip to content

Commit 3859606

Browse files
committed
Move ptr checks into if
1 parent 0560197 commit 3859606

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lldb/source/Core/FormatEntity.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,10 +1474,8 @@ bool FormatEntity::Format(const Entry &entry, Stream &s,
14741474

14751475
case Entry::Type::TargetFile:
14761476
if (exe_ctx) {
1477-
Target *target = exe_ctx->GetTargetPtr();
1478-
if (target) {
1479-
Module *exe_module = target->GetExecutableModulePointer();
1480-
if (exe_module) {
1477+
if (Target *target = exe_ctx->GetTargetPtr()) {
1478+
if (Module *exe_module = target->GetExecutableModulePointer()) {
14811479
if (DumpFile(s, exe_module->GetFileSpec(), (FileKind)entry.number))
14821480
return true;
14831481
}

0 commit comments

Comments
 (0)