The command for fetching the sample rate while in single shot mode doesn't take
an argument so the snprintf here is redundant.
/* No channel is active, ask the instrument for the sample rate
* in single shot mode */
if (!channel_found) {
/* 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)
state->sample_rate = tmp_float;
} else {
if (sr_scpi_get_int(sdi->conn, tmp_str, &tmp) != SR_OK)
state->sample_rate = tmp_float;
} else {
if (sr_scpi_get_int(sdi->conn, tmp_str, &tmp) != SR_OK)