mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Initialize the num variable to avoid uninitialized data.
This fixes the bug introduced by r238378. Reviewed by: pfg
This commit is contained in:
parent
b01bf72b6e
commit
09e1da2f6c
1 changed files with 2 additions and 2 deletions
|
|
@ -426,7 +426,7 @@ el_gets(EditLine *el, int *nread)
|
|||
char *cp = el->el_line.buffer;
|
||||
size_t idx;
|
||||
|
||||
while ((*el->el_read.read_char)(el, cp) == 1) {
|
||||
while ((num = (*el->el_read.read_char)(el, cp)) == 1) {
|
||||
/* make sure there is space for next character */
|
||||
if (cp + 1 >= el->el_line.limit) {
|
||||
idx = (cp - el->el_line.buffer);
|
||||
|
|
@ -479,7 +479,7 @@ el_gets(EditLine *el, int *nread)
|
|||
|
||||
term__flush(el);
|
||||
|
||||
while ((*el->el_read.read_char)(el, cp) == 1) {
|
||||
while ((num = (*el->el_read.read_char)(el, cp)) == 1) {
|
||||
/* make sure there is space next character */
|
||||
if (cp + 1 >= el->el_line.limit) {
|
||||
idx = (cp - el->el_line.buffer);
|
||||
|
|
|
|||
Loading…
Reference in a new issue