mic985xx: Add missing memset().

This commit is contained in:
Uwe Hermann 2013-02-11 18:23:17 +01:00
parent 6f3e5335ad
commit ff17e6ba50
1 changed files with 3 additions and 0 deletions

View File

@ -108,6 +108,9 @@ static int handle_packet(const uint8_t *buf, struct sr_dev_inst *sdi, int idx)
return SR_ERR;
}
/* Clear 'analog', otherwise it'll contain random garbage. */
memset(&analog, 0, sizeof(struct sr_datafeed_analog));
/* Common values for both probes. */
packet.type = SR_DF_ANALOG;
packet.payload = &analog;