From d0148a506ed1007518704d72c0410d4361668fa4 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sat, 14 Mar 2015 03:09:40 +0100 Subject: [PATCH] Make memset() invocations consistent across all files. --- src/hardware/appa-55ii/protocol.c | 4 ++-- src/hardware/baylibre-acme/protocol.c | 2 +- src/hardware/gmc-mh-1x-2x/protocol.c | 4 ++-- src/hardware/norma-dmm/protocol.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) 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);