mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-10-29 05:40:25 -04:00 
			
		
		
		
	test: use position offset macro of TLV data
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@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
		
							parent
							
								
									6dc2ed4090
								
							
						
					
					
						commit
						275a438d42
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -660,7 +660,7 @@ static int check_tlv(struct elem_set_trial *trial) | ||||||
| 	if (err < 0) | 	if (err < 0) | ||||||
| 		return err; | 		return err; | ||||||
| 
 | 
 | ||||||
| 	len = tlv[1] + sizeof(unsigned int) * 2; | 	len = tlv[SNDRV_CTL_TLVO_LEN] + sizeof(unsigned int) * 2; | ||||||
| 	curr = malloc(len); | 	curr = malloc(len); | ||||||
| 	if (curr == NULL) { | 	if (curr == NULL) { | ||||||
| 		free(tlv); | 		free(tlv); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Takashi Sakamoto
						Takashi Sakamoto