mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	topology: ctl: Fix access type checks
Fix the wrong bit-and check by adding parentheses properly:
  ctl.c: In function ‘tplg_add_bytes’:
  ctl.c:868:22: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
     if (be->hdr.access & SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE
                        ^
Signed-off-by: Takashi Iwai <tiwai@suse.de>
			
			
This commit is contained in:
		
							parent
							
								
									76b9cae026
								
							
						
					
					
						commit
						f41fe763e9
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -865,7 +865,7 @@ int tplg_add_bytes(snd_tplg_t *tplg, struct snd_tplg_bytes_template *bytes_ctl,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* check on TLV bytes control */
 | 
						/* check on TLV bytes control */
 | 
				
			||||||
	if (be->hdr.access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) {
 | 
						if (be->hdr.access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) {
 | 
				
			||||||
		if (be->hdr.access & SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE
 | 
							if ((be->hdr.access & SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE)
 | 
				
			||||||
			!= SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE) {
 | 
								!= SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE) {
 | 
				
			||||||
			SNDERR("error: Invalid TLV bytes control access 0x%x\n",
 | 
								SNDERR("error: Invalid TLV bytes control access 0x%x\n",
 | 
				
			||||||
				be->hdr.access);
 | 
									be->hdr.access);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue