Skip to content

Commit

Permalink
Address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub committed Nov 22, 2020
1 parent 43dbe24 commit 8fe2a9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ internal static partial class Interop
internal static partial class Kernel32
{
[DllImport(Libraries.Kernel32, ExactSpelling = true)]
internal static extern unsafe int FreeEnvironmentStringsW(char* lpszEnvironmentBlock);
internal static extern unsafe BOOL FreeEnvironmentStringsW(char* lpszEnvironmentBlock);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static unsafe IDictionary GetEnvironmentVariables()
{
// Add may throw if the environment block was corrupted leading to duplicate entries.
// We allow such throws and eat them (rather than proactively checking for duplication)
// to as to provide a non-fatal notification about the corruption.
// to provide a non-fatal notification about the corruption.
results.Add(key, value);
}
catch (ArgumentException) { }
Expand All @@ -118,8 +118,8 @@ public static unsafe IDictionary GetEnvironmentVariables()
}
finally
{
int success = Interop.Kernel32.FreeEnvironmentStringsW(stringPtr);
Debug.Assert(success != 0);
Interop.BOOL success = Interop.Kernel32.FreeEnvironmentStringsW(stringPtr);
Debug.Assert(success != Interop.BOOL.FALSE);
}
}
}
Expand Down

0 comments on commit 8fe2a9b

Please sign in to comment.