demo: Eliminate unneeded tmp_u64.
This commit is contained in:
parent
d3b1b51cbe
commit
68c12597ef
|
@ -185,7 +185,6 @@ static int *hw_get_capabilities(void)
|
||||||
static int hw_set_configuration(int device_index, int capability, void *value)
|
static int hw_set_configuration(int device_index, int capability, void *value)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
uint64_t *tmp_u64;
|
|
||||||
char *stropt;
|
char *stropt;
|
||||||
|
|
||||||
/* Avoid compiler warnings. */
|
/* Avoid compiler warnings. */
|
||||||
|
@ -195,20 +194,17 @@ static int hw_set_configuration(int device_index, int capability, void *value)
|
||||||
/* Nothing to do, but must be supported */
|
/* Nothing to do, but must be supported */
|
||||||
ret = SR_OK;
|
ret = SR_OK;
|
||||||
} else if (capability == SR_HWCAP_SAMPLERATE) {
|
} else if (capability == SR_HWCAP_SAMPLERATE) {
|
||||||
tmp_u64 = value;
|
cur_samplerate = *(uint64_t *)value;
|
||||||
cur_samplerate = *tmp_u64;
|
|
||||||
sr_dbg("demo: %s: setting samplerate to %" PRIu64, __func__,
|
sr_dbg("demo: %s: setting samplerate to %" PRIu64, __func__,
|
||||||
cur_samplerate);
|
cur_samplerate);
|
||||||
ret = SR_OK;
|
ret = SR_OK;
|
||||||
} else if (capability == SR_HWCAP_LIMIT_SAMPLES) {
|
} else if (capability == SR_HWCAP_LIMIT_SAMPLES) {
|
||||||
tmp_u64 = value;
|
limit_samples = *(uint64_t *)value;
|
||||||
limit_samples = *tmp_u64;
|
|
||||||
sr_dbg("demo: %s: setting limit_samples to %" PRIu64, __func__,
|
sr_dbg("demo: %s: setting limit_samples to %" PRIu64, __func__,
|
||||||
limit_samples);
|
limit_samples);
|
||||||
ret = SR_OK;
|
ret = SR_OK;
|
||||||
} else if (capability == SR_HWCAP_LIMIT_MSEC) {
|
} else if (capability == SR_HWCAP_LIMIT_MSEC) {
|
||||||
tmp_u64 = value;
|
limit_msec = *(uint64_t *)value;
|
||||||
limit_msec = *tmp_u64;
|
|
||||||
sr_dbg("demo: %s: setting limit_msec to %" PRIu64, __func__,
|
sr_dbg("demo: %s: setting limit_msec to %" PRIu64, __func__,
|
||||||
limit_msec);
|
limit_msec);
|
||||||
ret = SR_OK;
|
ret = SR_OK;
|
||||||
|
|
Loading…
Reference in New Issue