From: Frank Mori Hess Date: Wed, 30 Jan 2002 03:19:08 +0000 (+0000) Subject: fixed pointer arithmetic X-Git-Tag: r0_7_63~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=78397539bfb086b97dc0098d32f83df73010242c;p=comedi.git fixed pointer arithmetic --- diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index a1c2ef49..7b7a3bdc 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -294,14 +294,12 @@ static int do_devinfo_ioctl(comedi_device *dev,comedi_devinfo *arg) memcpy(devinfo.board_name,dev->board_name,COMEDI_NAMELEN); if(dev->read_subdev){ - devinfo.read_subdevice = (dev->read_subdev - dev->subdevices)/ - sizeof(comedi_subdevice); + devinfo.read_subdevice = dev->read_subdev - dev->subdevices; }else{ devinfo.read_subdevice = -1; } if(dev->write_subdev){ - devinfo.write_subdevice = (dev->write_subdev - dev->subdevices)/ - sizeof(comedi_subdevice); + devinfo.write_subdevice = dev->write_subdev - dev->subdevices; }else{ devinfo.write_subdevice = -1; }