The command for fetching the sample rate while in single shot mode doesn't take
an argument so the snprintf here is redundant.
---
hardware/hameg-hmo/protocol.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hardware/hameg-hmo/protocol.c b/hardware/hameg-hmo/protocol.c
index cb751c5..ff9cf29 100644
--- a/hardware/hameg-hmo/protocol.c
+++ b/hardware/hameg-hmo/protocol.c
@@ -453,11 +453,11 @@ SR_PRIV int hmo_update_sample_rate(const struct
sr_dev_inst *sdi)
/* No channel is active, ask the instrument for the sample rate
* in single shot mode */
if (!channel_found) {
- g_snprintf(tmp_str, sizeof(tmp_str),
- (*config->scpi_dialect)[SCPI_CMD_GET_SAMPLE_RATE]);
-
- if (sr_scpi_get_float(sdi->conn, tmp_str, &tmp_float) != SR_OK)
+ if (sr_scpi_get_float(sdi->conn,
+
(*config->scpi_dialect)[SCPI_CMD_GET_SAMPLE_RATE],
+ &tmp_float) != SR_OK)
return SR_ERR;
+
state->sample_rate = tmp_float;
} else {
if (sr_scpi_get_int(sdi->conn, tmp_str, &tmp) != SR_OK)
--
1.8.5.3
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel