mic985xx: Add missing memset().
This commit is contained in:
parent
6f3e5335ad
commit
ff17e6ba50
|
@ -108,6 +108,9 @@ static int handle_packet(const uint8_t *buf, struct sr_dev_inst *sdi, int idx)
|
||||||
return SR_ERR;
|
return SR_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Clear 'analog', otherwise it'll contain random garbage. */
|
||||||
|
memset(&analog, 0, sizeof(struct sr_datafeed_analog));
|
||||||
|
|
||||||
/* Common values for both probes. */
|
/* Common values for both probes. */
|
||||||
packet.type = SR_DF_ANALOG;
|
packet.type = SR_DF_ANALOG;
|
||||||
packet.payload = &analog;
|
packet.payload = &analog;
|
||||||
|
|
Loading…
Reference in New Issue