From: Uwe Hermann Date: Mon, 11 Feb 2013 17:23:17 +0000 (+0100) Subject: mic985xx: Add missing memset(). X-Git-Tag: dsupstream~265 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=ff17e6ba5094d590926a2aa8130220a341fc2c04;p=libsigrok.git mic985xx: Add missing memset(). --- diff --git a/hardware/mic-985xx/protocol.c b/hardware/mic-985xx/protocol.c index 828a91cc..5f2825e6 100644 --- a/hardware/mic-985xx/protocol.c +++ b/hardware/mic-985xx/protocol.c @@ -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;