Make memset() invocations consistent across all files.
This commit is contained in:
parent
0c5f2abc66
commit
d0148a506e
|
@ -102,7 +102,7 @@ static void appa_55ii_live_data(struct sr_dev_inst *sdi, const uint8_t *buf)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
val_ptr = values;
|
val_ptr = values;
|
||||||
memset(&analog, 0, sizeof(analog));
|
memset(&analog, 0, sizeof(struct sr_datafeed_analog));
|
||||||
analog.num_samples = 1;
|
analog.num_samples = 1;
|
||||||
analog.mq = SR_MQ_TEMPERATURE;
|
analog.mq = SR_MQ_TEMPERATURE;
|
||||||
analog.unit = SR_UNIT_CELSIUS;
|
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. */
|
/* FIXME: Timestamp should be sent in the packet. */
|
||||||
sr_dbg("Timestamp: %02d:%02d:%02d", buf[2], buf[3], buf[4]);
|
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.num_samples = 1;
|
||||||
analog.mq = SR_MQ_TEMPERATURE;
|
analog.mq = SR_MQ_TEMPERATURE;
|
||||||
analog.unit = SR_UNIT_CELSIUS;
|
analog.unit = SR_UNIT_CELSIUS;
|
||||||
|
|
|
@ -502,7 +502,7 @@ SR_PRIV int bl_acme_receive_data(int fd, int revents, void *cb_data)
|
||||||
|
|
||||||
packet.type = SR_DF_ANALOG;
|
packet.type = SR_DF_ANALOG;
|
||||||
packet.payload = &analog;
|
packet.payload = &analog;
|
||||||
memset(&analog, 0, sizeof(analog));
|
memset(&analog, 0, sizeof(struct sr_datafeed_analog));
|
||||||
analog.data = &valf;
|
analog.data = &valf;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -651,7 +651,7 @@ static void send_value(struct sr_dev_inst *sdi)
|
||||||
|
|
||||||
devc = sdi->priv;
|
devc = sdi->priv;
|
||||||
|
|
||||||
memset(&analog, 0, sizeof(analog));
|
memset(&analog, 0, sizeof(struct sr_datafeed_analog));
|
||||||
analog.channels = sdi->channels;
|
analog.channels = sdi->channels;
|
||||||
analog.num_samples = 1;
|
analog.num_samples = 1;
|
||||||
analog.mq = devc->mq;
|
analog.mq = devc->mq;
|
||||||
|
@ -659,7 +659,7 @@ static void send_value(struct sr_dev_inst *sdi)
|
||||||
analog.mqflags = devc->mqflags;
|
analog.mqflags = devc->mqflags;
|
||||||
analog.data = &devc->value;
|
analog.data = &devc->value;
|
||||||
|
|
||||||
memset(&packet, 0, sizeof(packet));
|
memset(&packet, 0, sizeof(struct sr_datafeed_packet));
|
||||||
packet.type = SR_DF_ANALOG;
|
packet.type = SR_DF_ANALOG;
|
||||||
packet.payload = &analog;
|
packet.payload = &analog;
|
||||||
sr_session_send(devc->cb_data, &packet);
|
sr_session_send(devc->cb_data, &packet);
|
||||||
|
|
|
@ -116,7 +116,7 @@ static void nma_process_line(const struct sr_dev_inst *sdi)
|
||||||
/* Start decoding. */
|
/* Start decoding. */
|
||||||
value = 0.0;
|
value = 0.0;
|
||||||
scale = 1.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.
|
* 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.num_samples = 1;
|
||||||
analog.data = &value;
|
analog.data = &value;
|
||||||
|
|
||||||
memset(&packet, 0, sizeof(packet));
|
memset(&packet, 0, sizeof(struct sr_datafeed_packet));
|
||||||
packet.type = SR_DF_ANALOG;
|
packet.type = SR_DF_ANALOG;
|
||||||
packet.payload = &analog;
|
packet.payload = &analog;
|
||||||
sr_session_send(devc->cb_data, &packet);
|
sr_session_send(devc->cb_data, &packet);
|
||||||
|
|
Loading…
Reference in New Issue