A series of SNDRV_CTL_TLVO_XXX macro was introduced for position offset of TLV data. This commit applies a code optimization. Signed-off-by: Takashi Sakamoto <o-takashi@xxxxxxxxxxxxx> --- test/user-ctl-element-set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/user-ctl-element-set.c b/test/user-ctl-element-set.c index e94152b9..fee130e2 100644 --- a/test/user-ctl-element-set.c +++ b/test/user-ctl-element-set.c @@ -660,7 +660,7 @@ static int check_tlv(struct elem_set_trial *trial) if (err < 0) return err; - len = tlv[1] + sizeof(unsigned int) * 2; + len = tlv[SNDRV_CTL_TLVO_LEN] + sizeof(unsigned int) * 2; curr = malloc(len); if (curr == NULL) { free(tlv); -- 2.14.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel