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



The following reply was made to PR lib/46935; it has been noted by GNATS.

From: Steffen "Daode" Nurpmeso <sdaoden%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: netbsd-bugs%netbsd.org@localhost, lib-bug-people%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost
Subject: Re: PR/46935 CVS commit: src/lib/libedit
Date: Tue, 11 Sep 2012 13:15:06 +0200

 "Christos Zoulas" <christos%netbsd.org@localhost> wrote:
 
  |The following reply was made to PR lib/46935; it has been noted by GNATS.
  |
  |From: "Christos Zoulas" <christos%netbsd.org@localhost>
  |To: gnats-bugs%gnats.NetBSD.org@localhost
  |Cc: 
  |Subject: PR/46935 CVS commit: src/lib/libedit
  |Date: Mon, 10 Sep 2012 16:53:18 -0400
  |
  | Module Name:        src
  | Committed By:       christos
  | Date:               Mon Sep 10 20:53:18 UTC 2012
  | 
  | Modified Files:
  |     src/lib/libedit: read.c
  | 
  | Log Message:
  | PR/46935: Steffen Nurpmeso: editline(3) (libedit): faulty errno handling,
  | faulty reuse of val in wrong context
  | 
  | 
  | To generate a diff of this commit:
  | cvs rdiff -u -r1.67 -r1.68 src/lib/libedit/read.c
  | 
  | Please note that diffs are not public domain; they are subject to the
  | copyright notices on the relevant files.
  | 
 
 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);
                }
  
  #ifdef        KANJI
 


Home | Main Index | Thread Index | Old Index