tweaks: remove a superfluous check on the length of the key buffer
None of the calls of get_input() ask for more codes than those which already were or will now have become available in the key buffer.master
parent
7157f5a3ce
commit
294051769c
|
@ -300,10 +300,6 @@ int *get_input(WINDOW *win, size_t input_len)
|
||||||
if (key_buffer_len == 0)
|
if (key_buffer_len == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* Limit the request to the number of available codes in the buffer. */
|
|
||||||
if (input_len > key_buffer_len)
|
|
||||||
input_len = key_buffer_len;
|
|
||||||
|
|
||||||
/* Copy input_len codes from the head of the keystroke buffer. */
|
/* Copy input_len codes from the head of the keystroke buffer. */
|
||||||
input = (int *)nmalloc(input_len * sizeof(int));
|
input = (int *)nmalloc(input_len * sizeof(int));
|
||||||
memcpy(input, key_buffer, input_len * sizeof(int));
|
memcpy(input, key_buffer, input_len * sizeof(int));
|
||||||
|
|
Loading…
Reference in New Issue