2020*/
2121/* **********************************************************************/
2222I2cModel::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)
3023{
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));
3131 // no-op
3232}
3333
@@ -37,7 +37,13 @@ I2cModel::I2cModel()
3737*/
3838/* **********************************************************************/
3939I2cModel::~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));
4147}
4248
4349/* **************************************************************************/
0 commit comments