Return error EFBIG, if the set or map cannot grow any further because of the SIZE_MAX limit.
This commit is contained in:
parent
669bf3a28b
commit
661b9ce39b
10
README.md
10
README.md
@ -195,7 +195,10 @@ On success, this function returns *zero*. On error, the appropriate error code i
|
||||
The given item was *not* inserted into the hash set (again), because it was already present.
|
||||
|
||||
* `ENOMEM`
|
||||
The item could *not* be inserted, because the required amount of memory could *not* be allocated.
|
||||
The set failed to grow, because the required amount of memory could *not* be allocated (out of memory).
|
||||
|
||||
* `EFBIG`
|
||||
The set needs to grow, but doing so would exceed the maximum size supported by the underlying system.
|
||||
|
||||
* `EFAULT`
|
||||
Something else went wrong. This usually indicates an internal error and is *not* supposed to happen.
|
||||
@ -551,7 +554,10 @@ On success, this function returns *zero*. On error, the appropriate error code i
|
||||
Nonetheless, if `update` was non-zero, the value associated with the existing key has been updated.
|
||||
|
||||
* `ENOMEM`
|
||||
The key could *not* be inserted, because the required amount of memory could *not* be allocated.
|
||||
The map failed to grow, because the required amount of memory could *not* be allocated (out of memory).
|
||||
|
||||
* `EFBIG`
|
||||
The map needs to grow, but doing so would exceed the maximum size supported by the underlying system.
|
||||
|
||||
* `EFAULT`
|
||||
Something else went wrong. This usually indicates an internal error and is *not* supposed to happen.
|
||||
|
@ -265,7 +265,7 @@ errno_t DECLARE(hash_map_insert)(hash_map_t *const instance, const value_t key,
|
||||
}
|
||||
else
|
||||
{
|
||||
return ENOMEM; /*can not grow any futher!*/
|
||||
return EFBIG; /*can not grow any futher!*/
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ errno_t DECLARE(hash_set_insert)(hash_set_t *const instance, const value_t item)
|
||||
}
|
||||
else
|
||||
{
|
||||
return ENOMEM; /*can not grow any futher!*/
|
||||
return EFBIG; /*can not grow any futher!*/
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user