NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/46942: editline(3): el_get(): fix UNBUFFERED return



>Number:         46942
>Category:       lib
>Synopsis:       editline(3): el_get(): fix UNBUFFERED return
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 11 11:40:00 +0000 2012
>Originator:     Steffen Nurpmeso
>Release:        netbsd-6-base
>Organization:
>Environment:
None.  netbsd-6-base as of 08-31, manually patched up.
>Description:
Return value is '!' not '! !'.  Use !=0 though i hate it.
>How-To-Repeat:
Read source.
>Fix:
    el_get(): fix UNBUFFERED return

diff --git a/src/lib/libedit/el.c b/src/lib/libedit/el.c
index 809af41..f44e8a5 100644
--- a/src/lib/libedit/el.c
+++ b/src/lib/libedit/el.c
@@ -439,7 +439,7 @@ FUN(el,get)(EditLine *el, int op, ...)
                break;
 
        case EL_UNBUFFERED:
-               *va_arg(ap, int *) = (!(el->el_flags & UNBUFFERED));
+               *va_arg(ap, int *) = ((el->el_flags & UNBUFFERED) != 0);
                rv = 0;
                break;
 



Home | Main Index | Thread Index | Old Index