Skip to content

Commit

Permalink
DEV9: Add const to variables in TCP session
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLastRar committed Apr 23, 2024
1 parent 3504a70 commit 10ed3d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pcsx2/DEV9/Sessions/TCP_Session/TCP_Session_In.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ namespace Sessions
// Server closed the Socket
if (recived == 0)
{
int result = shutdown(client, SD_RECEIVE);
const int result = shutdown(client, SD_RECEIVE);
if (result == SOCKET_ERROR)
Console.Error("DEV9: TCP: Shutdown SD_RECEIVE error: %d",
#ifdef _WIN32
Expand Down
6 changes: 3 additions & 3 deletions pcsx2/DEV9/Sessions/TCP_Session/TCP_Session_Out.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ namespace Sessions
PayloadPtr* payload = static_cast<PayloadPtr*>(tcp->GetPayload());
while (sent != payload->GetLength())
{
int ret = send(client, reinterpret_cast<const char*>(&payload->data[sent]), payload->GetLength() - sent, 0);
const int ret = send(client, reinterpret_cast<const char*>(&payload->data[sent]), payload->GetLength() - sent, 0);

if (ret == SOCKET_ERROR)
{
Expand Down Expand Up @@ -475,7 +475,7 @@ namespace Sessions
}
bool TCP_Session::ValidateEmptyPacket(TCP_Packet* tcp, bool ignoreOld)
{
NumCheckResult ResultFIN = CheckNumbers(tcp, !ignoreOld);
const NumCheckResult ResultFIN = CheckNumbers(tcp, !ignoreOld);
if (ResultFIN == NumCheckResult::Bad)
{
CloseByRemoteRST();
Expand Down Expand Up @@ -578,7 +578,7 @@ namespace Sessions
receivedPS2SeqNumbers.push_back(expectedSeqNumber);
expectedSeqNumber += 1;

int result = shutdown(client, SD_SEND);
const int result = shutdown(client, SD_SEND);
if (result == SOCKET_ERROR)
Console.Error("DEV9: TCP: Shutdown SD_SEND error: %d",
#ifdef _WIN32
Expand Down

0 comments on commit 10ed3d8

Please sign in to comment.