Skip to content

Commit cd58b22

Browse files
committed
refactor(network): Use NO_ERROR constant instead of magic number 0 in UDP error handling
1 parent 4661df4 commit cd58b22

File tree

2 files changed

+2
-2
lines changed
  • GeneralsMD/Code/GameEngine/Source/GameNetwork
  • Generals/Code/GameEngine/Source/GameNetwork

2 files changed

+2
-2
lines changed

Generals/Code/GameEngine/Source/GameNetwork/udp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ UDP::sockStat UDP::GetStatus(void)
328328
#ifdef _WINDOWS
329329
//int status=WSAGetLastError();
330330
switch (status) {
331-
case 0:
331+
case NO_ERROR:
332332
return OK;
333333
case WSAEINTR:
334334
return INTR;

GeneralsMD/Code/GameEngine/Source/GameNetwork/udp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ UDP::sockStat UDP::GetStatus(void)
328328
#ifdef _WINDOWS
329329
//int status=WSAGetLastError();
330330
switch (status) {
331-
case 0:
331+
case NO_ERROR:
332332
return OK;
333333
case WSAEINTR:
334334
return INTR;

0 commit comments

Comments
 (0)