Skip to content

Commit 73c07e3

Browse files
committed
Fix two minor UnixEndPoint static analysis warnings.
1 parent c752226 commit 73c07e3

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/MySqlConnector/Utilities/UnixEndPoint.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,6 @@ public UnixEndPoint(string filename)
5656

5757
public override EndPoint Create(SocketAddress socketAddress)
5858
{
59-
/*
60-
* Should also check this
61-
*
62-
int addr = (int) AddressFamily.Unix;
63-
if (socketAddress [0] != (addr & 0xFF))
64-
throw new ArgumentException ("socketAddress is not a unix socket address.");
65-
if (socketAddress [1] != ((addr & 0xFF00) >> 8))
66-
throw new ArgumentException ("socketAddress is not a unix socket address.");
67-
*/
68-
6959
if (socketAddress.Size == 2) {
7060
// Empty filename.
7161
// Probably from RemoteEndPoint which on linux does not return the file name.
@@ -103,6 +93,6 @@ public override SocketAddress Serialize()
10393

10494
public override int GetHashCode() => Filename.GetHashCode ();
10595

106-
public override bool Equals(object? o) => o is UnixEndPoint other && Filename == other.Filename;
96+
public override bool Equals(object? obj) => obj is UnixEndPoint other && Filename == other.Filename;
10797
}
10898
}

0 commit comments

Comments
 (0)