mirror of
https://github.com/troglobit/editline.git
synced 2025-11-07 05:28:16 +08:00
Attempt to work around slightly bogus Coverity warnings.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -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,
|
/* Must check that pos is not the next to last array position,
|
||||||
* otherwise we will write out-of-bounds to terminate the list. */
|
* otherwise we will write out-of-bounds to terminate the list. */
|
||||||
if (pos >= mapsz - 1) {
|
if (pos + 1 >= mapsz) {
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
return CSeof;
|
return CSeof;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user