Use consistent naming for OOM
All checks were successful
CI / build-and-analyze (push) Successful in 1m12s
All checks were successful
CI / build-and-analyze (push) Successful in 1m12s
This commit is contained in:
@@ -28,7 +28,7 @@ static int wsaToErrorCode(int value) {
|
||||
|
||||
case WSAENOBUFS:
|
||||
case WSA_NOT_ENOUGH_MEMORY:
|
||||
return CGE_NET_ENOMEM;
|
||||
return CGE_NET_EOOM;
|
||||
|
||||
case WSAEADDRINUSE:
|
||||
return CGE_NET_EADDRINUSE;
|
||||
@@ -87,7 +87,7 @@ static int socketInit(CgeNetSocket *s, int domain, int type) {
|
||||
|
||||
CgeNetSocket *CgeNetOpen(int domain, int type, int *result) {
|
||||
CgeNetSocket *socket = NULL;
|
||||
int code = CGE_NET_ENOMEM;
|
||||
int code = CGE_NET_EOOM;
|
||||
|
||||
if ((socket = malloc(sizeof(*socket)))) {
|
||||
if ((code = socketInit(socket, domain, type))) {
|
||||
@@ -213,7 +213,7 @@ CgeNetSocket *CgeNetAccept(CgeNetSocket *socket, CgeNetAddr *addr) {
|
||||
|
||||
if (!(client = malloc(sizeof(*client)))) {
|
||||
closesocket(fd);
|
||||
socket->lastError = CGE_NET_ENOMEM;
|
||||
socket->lastError = CGE_NET_EOOM;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user