mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	My bogus assumption on add_tail semantic
This commit is contained in:
		
							parent
							
								
									b260b72fc9
								
							
						
					
					
						commit
						eed38f2157
					
				
					 2 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -147,10 +147,10 @@ static int snd_hctl_elem_add(snd_hctl_t *hctl, snd_hctl_elem_t *elem)
 | 
			
		|||
		idx = _snd_hctl_find_elem(hctl, &elem->id, &dir);
 | 
			
		||||
		assert(dir != 0);
 | 
			
		||||
		if (dir > 0) {
 | 
			
		||||
			list_add_tail(&elem->list, &hctl->pelems[idx]->list);
 | 
			
		||||
			list_add(&elem->list, &hctl->pelems[idx]->list);
 | 
			
		||||
			idx++;
 | 
			
		||||
		} else {
 | 
			
		||||
			list_add(&elem->list, &hctl->pelems[idx]->list);
 | 
			
		||||
			list_add_tail(&elem->list, &hctl->pelems[idx]->list);
 | 
			
		||||
		}
 | 
			
		||||
		memmove(hctl->pelems + idx + 1,
 | 
			
		||||
			hctl->pelems + idx,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue