20
20
*/
21
21
/* **********************************************************************/
22
22
I2cModel::I2cModel ()
23
- : _msg_i2c_bus_scan(wippersnapper_i2c_I2cBusScan_init_default),
24
- _msg_i2c_bus_scanned(wippersnapper_i2c_I2cBusScanned_init_default),
25
- _msg_i2c_device_add_replace(wippersnapper_i2c_I2cDeviceAddOrReplace_init_default),
26
- _msg_i2c_device_added_replaced(wippersnapper_i2c_I2cDeviceAddedOrReplaced_init_default),
27
- _msg_i2c_device_remove(wippersnapper_i2c_I2cDeviceRemove_init_default),
28
- _msg_i2c_device_removed(wippersnapper_i2c_I2cDeviceRemoved_init_default),
29
- _msg_i2c_device_event(wippersnapper_i2c_I2cDeviceEvent_init_default)
30
23
{
24
+ memset (&_msg_i2c_bus_scan, 0 , sizeof (_msg_i2c_bus_scan));
25
+ memset (&_msg_i2c_bus_scanned, 0 , sizeof (_msg_i2c_bus_scanned));
26
+ memset (&_msg_i2c_device_add_replace, 0 , sizeof (_msg_i2c_device_add_replace));
27
+ memset (&_msg_i2c_device_added_replaced, 0 , sizeof (_msg_i2c_device_added_replaced));
28
+ memset (&_msg_i2c_device_remove, 0 , sizeof (_msg_i2c_device_remove));
29
+ memset (&_msg_i2c_device_removed, 0 , sizeof (_msg_i2c_device_removed));
30
+ memset (&_msg_i2c_device_event, 0 , sizeof (_msg_i2c_device_event));
31
31
// no-op
32
32
}
33
33
@@ -37,7 +37,13 @@ I2cModel::I2cModel()
37
37
*/
38
38
/* **********************************************************************/
39
39
I2cModel::~I2cModel () {
40
- // nothing to add here!
40
+ memset (&_msg_i2c_bus_scan, 0 , sizeof (_msg_i2c_bus_scan));
41
+ memset (&_msg_i2c_bus_scanned, 0 , sizeof (_msg_i2c_bus_scanned));
42
+ memset (&_msg_i2c_device_add_replace, 0 , sizeof (_msg_i2c_device_add_replace));
43
+ memset (&_msg_i2c_device_added_replaced, 0 , sizeof (_msg_i2c_device_added_replaced));
44
+ memset (&_msg_i2c_device_remove, 0 , sizeof (_msg_i2c_device_remove));
45
+ memset (&_msg_i2c_device_removed, 0 , sizeof (_msg_i2c_device_removed));
46
+ memset (&_msg_i2c_device_event, 0 , sizeof (_msg_i2c_device_event));
41
47
}
42
48
43
49
/* **************************************************************************/
0 commit comments