]> sigrok.org Git - libsigrok.git/commitdiff
mic985xx: Add missing memset().
authorUwe Hermann <redacted>
Mon, 11 Feb 2013 17:23:17 +0000 (18:23 +0100)
committerUwe Hermann <redacted>
Mon, 11 Feb 2013 17:23:17 +0000 (18:23 +0100)
hardware/mic-985xx/protocol.c

index 828a91cc24084a7f02e17b63a0564cfcc2cd747e..5f2825e65b740103d56e101f052cb4fa85497704 100644 (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;