fixed pointer arithmetic
authorFrank Mori Hess <fmhess@speakeasy.net>
Wed, 30 Jan 2002 03:19:08 +0000 (03:19 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Wed, 30 Jan 2002 03:19:08 +0000 (03:19 +0000)
comedi/comedi_fops.c

index a1c2ef492491ef7508d31c37af6979341334aa58..7b7a3bdcd737b5c228833c38a3ca0e8cfc6d66b8 100644 (file)
@@ -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;
        }