Skip to content

Commit 93a5a03

Browse files
committed
[lldb] Host::ShellExpandArguments - fix error check for valid dictionary
Fix repeated check for a valid JSON parse and actually check the dictionary pointer Reported here: https://pvs-studio.com/en/blog/posts/cpp/1003/ (N40)
1 parent 6fcaaf8 commit 93a5a03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Host/windows/Host.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ Status Host::ShellExpandArguments(ProcessLaunchInfo &launch_info) {
245245
}
246246

247247
auto dict_sp = data_sp->GetAsDictionary();
248-
if (!data_sp) {
248+
if (!dict_sp) {
249249
error.SetErrorString("invalid JSON");
250250
return error;
251251
}

0 commit comments

Comments
 (0)