From: Uwe Hermann Date: Sat, 14 Mar 2015 02:09:40 +0000 (+0100) Subject: Make memset() invocations consistent across all files. X-Git-Tag: libsigrok-0.4.0~572 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=d0148a506ed1007518704d72c0410d4361668fa4;p=libsigrok.git Make memset() invocations consistent across all files. --- diff --git a/src/hardware/appa-55ii/protocol.c b/src/hardware/appa-55ii/protocol.c index 354bd83f..a439a148 100644 --- a/src/hardware/appa-55ii/protocol.c +++ b/src/hardware/appa-55ii/protocol.c @@ -102,7 +102,7 @@ static void appa_55ii_live_data(struct sr_dev_inst *sdi, const uint8_t *buf) return; val_ptr = values; - memset(&analog, 0, sizeof(analog)); + memset(&analog, 0, sizeof(struct sr_datafeed_analog)); analog.num_samples = 1; analog.mq = SR_MQ_TEMPERATURE; analog.unit = SR_UNIT_CELSIUS; @@ -154,7 +154,7 @@ static void appa_55ii_log_data_parse(struct sr_dev_inst *sdi) /* FIXME: Timestamp should be sent in the packet. */ sr_dbg("Timestamp: %02d:%02d:%02d", buf[2], buf[3], buf[4]); - memset(&analog, 0, sizeof(analog)); + memset(&analog, 0, sizeof(struct sr_datafeed_analog)); analog.num_samples = 1; analog.mq = SR_MQ_TEMPERATURE; analog.unit = SR_UNIT_CELSIUS; diff --git a/src/hardware/baylibre-acme/protocol.c b/src/hardware/baylibre-acme/protocol.c index 8769eefe..656e89fe 100644 --- a/src/hardware/baylibre-acme/protocol.c +++ b/src/hardware/baylibre-acme/protocol.c @@ -502,7 +502,7 @@ SR_PRIV int bl_acme_receive_data(int fd, int revents, void *cb_data) packet.type = SR_DF_ANALOG; packet.payload = &analog; - memset(&analog, 0, sizeof(analog)); + memset(&analog, 0, sizeof(struct sr_datafeed_analog)); analog.data = &valf; /* diff --git a/src/hardware/gmc-mh-1x-2x/protocol.c b/src/hardware/gmc-mh-1x-2x/protocol.c index ffa3a2d8..e7d7fc88 100644 --- a/src/hardware/gmc-mh-1x-2x/protocol.c +++ b/src/hardware/gmc-mh-1x-2x/protocol.c @@ -651,7 +651,7 @@ static void send_value(struct sr_dev_inst *sdi) devc = sdi->priv; - memset(&analog, 0, sizeof(analog)); + memset(&analog, 0, sizeof(struct sr_datafeed_analog)); analog.channels = sdi->channels; analog.num_samples = 1; analog.mq = devc->mq; @@ -659,7 +659,7 @@ static void send_value(struct sr_dev_inst *sdi) analog.mqflags = devc->mqflags; analog.data = &devc->value; - memset(&packet, 0, sizeof(packet)); + memset(&packet, 0, sizeof(struct sr_datafeed_packet)); packet.type = SR_DF_ANALOG; packet.payload = &analog; sr_session_send(devc->cb_data, &packet); diff --git a/src/hardware/norma-dmm/protocol.c b/src/hardware/norma-dmm/protocol.c index d6733b2f..e8270593 100644 --- a/src/hardware/norma-dmm/protocol.c +++ b/src/hardware/norma-dmm/protocol.c @@ -116,7 +116,7 @@ static void nma_process_line(const struct sr_dev_inst *sdi) /* Start decoding. */ value = 0.0; scale = 1.0; - memset(&analog, 0, sizeof(analog)); + memset(&analog, 0, sizeof(struct sr_datafeed_analog)); /* * The numbers are hex digits, starting from 0. @@ -359,7 +359,7 @@ static void nma_process_line(const struct sr_dev_inst *sdi) analog.num_samples = 1; analog.data = &value; - memset(&packet, 0, sizeof(packet)); + memset(&packet, 0, sizeof(struct sr_datafeed_packet)); packet.type = SR_DF_ANALOG; packet.payload = &analog; sr_session_send(devc->cb_data, &packet);