Skip to content

Commit 71054df

Browse files
committed
Non-null dumpPath
1 parent 52e97be commit 71054df

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/BenchmarkDotNet/Disassemblers/ClrMdDisassembler.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private DataTarget Attach(int processId)
9292
if (OsDetector.IsMacOS())
9393
{
9494
// ClrMD does not support CreateSnapshotAndAttach on MacOS, and AttachToProcess is unreliable, so we have to create a dump file and load it.
95-
string? dumpPath = Path.GetTempFileName();
95+
string dumpPath = Path.GetTempFileName();
9696
try
9797
{
9898
try
@@ -107,10 +107,7 @@ private DataTarget Attach(int processId)
107107
}
108108
finally
109109
{
110-
if (dumpPath != null)
111-
{
112-
File.Delete(dumpPath);
113-
}
110+
File.Delete(dumpPath);
114111
}
115112
}
116113
throw new NotSupportedException($"{System.Runtime.InteropServices.RuntimeInformation.OSDescription} is not supported");

0 commit comments

Comments
 (0)