NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: PR/46935 CVS commit: src/lib/libedit
On Sep 11, 1:15pm, sdaoden%gmail.com@localhost (Steffen "Daode" Nurpmeso)
wrote:
-- Subject: Re: PR/46935 CVS commit: src/lib/libedit
| I'm sorry but i have forgotten some bits as below.
| (errno already set by called fun, *num* has to be mapped.)
|
| --steffen
|
| Forgotten bits of errno codeflow
| ---
| src/lib/libedit/read.c | 3 +--
| 1 files changed, 1 insertions(+), 2 deletions(-)
|
| diff --git a/src/lib/libedit/read.c b/src/lib/libedit/read.c
| index 38d586c..7986394 100644
| --- a/src/lib/libedit/read.c
| +++ b/src/lib/libedit/read.c
| @@ -245,8 +245,7 @@ read_getcmd(EditLine *el, el_action_t *cmdnum, Char *ch)
| el->el_errno = 0;
| do {
| if ((num = FUN(el,getc)(el, ch)) != 1) {/* if EOF or error */
| - el->el_errno = num == 0 ? 0 : errno;
| - return num;
| + return (num < 0 ? 1 : 0);
| }
That is supposed to return a CMD; shouldn't it return ED_END_OF_FILE or
something?
christos
Home |
Main Index |
Thread Index |
Old Index