From db0bf4d239a5eeb3a83fece00d92006244b78db8 Mon Sep 17 00:00:00 2001 From: joerg Date: Fri, 10 Dec 2010 14:04:41 +0000 Subject: Fix __retval vs. retval confusion: retval is meant to store the (userland) pointer where data is to be returned by ibask() (currently unimplemented), while __retval holds the value returned by the libgpib ibfoo() functions. The confusion resulted in the ibfoo() functions returning an uninitialized value except in situations where the GPIB activity has been terminated abnormally. MFC after: 3 days --- sys/dev/ieee488/ibfoo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev/ieee488/ibfoo.c') diff --git a/sys/dev/ieee488/ibfoo.c b/sys/dev/ieee488/ibfoo.c index 7ae9160..b8ec2bd 100644 --- a/sys/dev/ieee488/ibfoo.c +++ b/sys/dev/ieee488/ibfoo.c @@ -1019,7 +1019,7 @@ gpib_ib_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thre ap->__iberr = 0; ap->__ibsta = 0; ap->__ibcnt = 0; - ap->retval = 0; + ap->__retval = 0; if (ap->__field & __F_TMO) { if (ap->tmo < 0 || ap->tmo >= max_timeouts) -- cgit v1.1