Subject: lib/4012: broken code in libedit/read.c
To: None <gnats-bugs@gnats.netbsd.org>
From: David Holland <dholland@bordeaux.eecs.harvard.edu>
List: netbsd-bugs
Date: 08/19/1997 04:14:37
>Number:         4012
>Category:       lib
>Synopsis:       bogus code in lib/libedit/read.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 19 01:20:00 1997
>Last-Modified:
>Originator:     David A. Holland <dholland@eecs.harvard.edu>
>Organization:
   - David A. Holland             |    VINO project home page:
     dholland@eecs.harvard.edu    | http://www.eecs.harvard.edu/vino
>Release:        NetBSD-current of 19970410 and probably later
>Environment:
	
System: NetBSD bordeaux 1.2C NetBSD 1.2C (BORDEAUX.PROF) #28: Sat Mar 1 16:28:54 EST 1997 abrown@bordeaux:/usr/src/sys/arch/i386/compile/BORDEAUX.PROF i386


>Description:

	In lib/libedit/read.c there are two chunks of code
	conditionalized on #ifdef FIONREAD. In the ordinary course of
	things the header files included by read.c don't pull in the
	definition of FIONREAD. However, if FIONREAD becomes defined,
	such as by adding <sys/ioctl.h>, this code suddenly appears,
	and it doesn't compile.

>How-To-Repeat:

>Fix:

	The first block calls a function with too few arguments, and
	I think it's fairly clear an additional first argument "el"
	should be added.

	The second block refers to a nonexistent variable "ma" and I
	don't have any idea what to do about it.

	I'd suggest someone have a look and either fix the thing, or,
	more likely, remove it.

>Audit-Trail:
>Unformatted: