diff options
author | Dennis "D.C." Dietrich <dennisdietrich@users.noreply.github.com> | 2017-02-10 03:47:19 +0300 |
---|---|---|
committer | Dennis "D.C." Dietrich <dennisdietrich@users.noreply.github.com> | 2017-02-10 03:47:19 +0300 |
commit | 05c544cb5fe109357d61d1391b3ab4860a5b2eaf (patch) | |
tree | c162ca6a6029a2eab4cb89716b52d211048b98a5 /src/System.Net.NetworkInformation | |
parent | a8bcdac9416b498b892941873f608b1ee55eb3e6 (diff) |
Marking code as unchecked (pt 5)
Marking code that may intentionally lead to over or underflows with
unchecked in preparation of turning on CheckForOverflowUnderflow for
all projects (issue #3140)
Diffstat (limited to 'src/System.Net.NetworkInformation')
2 files changed, 2 insertions, 2 deletions
diff --git a/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/SystemIPv4InterfaceProperties.cs b/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/SystemIPv4InterfaceProperties.cs index b649504af3..6bb9db109d 100644 --- a/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/SystemIPv4InterfaceProperties.cs +++ b/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/SystemIPv4InterfaceProperties.cs @@ -64,7 +64,7 @@ namespace System.Net.NetworkInformation { get { - return (int)_mtu; + return unchecked((int)_mtu); } } diff --git a/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/SystemIPv6InterfaceProperties.cs b/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/SystemIPv6InterfaceProperties.cs index 65b03ebd4a..1596fde405 100644 --- a/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/SystemIPv6InterfaceProperties.cs +++ b/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/SystemIPv6InterfaceProperties.cs @@ -31,7 +31,7 @@ namespace System.Net.NetworkInformation { get { - return (int)_mtu; + return unchecked((int)_mtu); } } |