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:
@@ -14,7 +14,7 @@ static int errnoToErrorCode(int value) {
|
||||
return CGE_NET_EINVAL;
|
||||
|
||||
case ENOMEM:
|
||||
return CGE_NET_ENOMEM;
|
||||
return CGE_NET_EOOM;
|
||||
|
||||
case EWOULDBLOCK:
|
||||
return CGE_NET_EWOULDBLOCK;
|
||||
@@ -29,7 +29,7 @@ CgeNetPoll *CgeNetPollCreate(int *result) {
|
||||
|
||||
if (!(poll = malloc(sizeof(CgeNetPoll)))) {
|
||||
if (result)
|
||||
*result = CGE_NET_ENOMEM;
|
||||
*result = CGE_NET_EOOM;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ CgeNetPoll *CgeNetPollCreate(int *result) {
|
||||
free(poll);
|
||||
|
||||
if (result)
|
||||
*result = CGE_NET_ENOMEM;
|
||||
*result = CGE_NET_EOOM;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ static int ensureCapacity(CgeNetPoll *poll) {
|
||||
if (!newData || !newPfd) {
|
||||
free(newData);
|
||||
free(newPfd);
|
||||
poll->lastError = CGE_NET_ENOMEM;
|
||||
poll->lastError = CGE_NET_EOOM;
|
||||
return 0;
|
||||
} else {
|
||||
memcpy(newData, poll->data, poll->size * sizeof(struct PollData));
|
||||
|
||||
Reference in New Issue
Block a user