fixed initialization of comedi_device bug due to sizeof returning size of pointer...
authorFrank Mori Hess <fmhess@speakeasy.net>
Fri, 20 Apr 2001 22:43:20 +0000 (22:43 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Fri, 20 Apr 2001 22:43:20 +0000 (22:43 +0000)
comedi/drivers.c

index 2d03e41b65d858469b1757ee594368be320d26b5..cc45c86be28a373bea5377820142da5b0abf6517 100644 (file)
@@ -106,7 +106,7 @@ int comedi_device_attach(comedi_device *dev,comedi_devconfig *it)
 
        minor = dev->minor;
        use_count = dev->use_count;
-       memset(dev,0,sizeof(dev));
+       memset(dev,0,sizeof(comedi_device));
        dev->minor=minor;
        dev->use_count = use_count;