mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	ucm: fix regexec() REG_NOMATCH state handling for define regex
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
		
							parent
							
								
									590df3a5b1
								
							
						
					
					
						commit
						414e4a759b
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -166,6 +166,8 @@ int uc_mgr_define_regex(snd_use_case_mgr_t *uc_mgr, const char *name,
 | 
				
			||||||
	err = regexec(&re, s, ARRAY_SIZE(match), match, 0);
 | 
						err = regexec(&re, s, ARRAY_SIZE(match), match, 0);
 | 
				
			||||||
	if (err < 0)
 | 
						if (err < 0)
 | 
				
			||||||
		err = -errno;
 | 
							err = -errno;
 | 
				
			||||||
 | 
						else if (err == REG_NOMATCH)
 | 
				
			||||||
 | 
							err = 0;
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		err = set_variables(uc_mgr, s, ARRAY_SIZE(match), match, name);
 | 
							err = set_variables(uc_mgr, s, ARRAY_SIZE(match), match, name);
 | 
				
			||||||
	free(s);
 | 
						free(s);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue