Attempt to work around slightly bogus Coverity warnings.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2015-09-10 13:06:39 +02:00
parent 9fbad9dbff
commit 7abfadd7e6

View File

@ -1701,7 +1701,7 @@ static el_status_t el_bind_key_in_map(int key, el_keymap_func_t function, el_key
/* Must check that pos is not the next to last array position,
* otherwise we will write out-of-bounds to terminate the list. */
if (pos >= mapsz - 1) {
if (pos + 1 >= mapsz) {
errno = ENOMEM;
return CSeof;
}