mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	Change assert condition in error message handler
Activating assert() in the default error message handler isn't always good for producitve systems. Make this optional and enable only when a special configure option is given (i.e. for explicit debugging).
This commit is contained in:
		
							parent
							
								
									d6093c58f3
								
							
						
					
					
						commit
						631f7cde82
					
				
					 3 changed files with 23 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -135,8 +135,11 @@ static void snd_err_msg_default(const char *file, int line, const char *function
 | 
			
		|||
		fprintf(stderr, ": %s", snd_strerror(err));
 | 
			
		||||
	putc('\n', stderr);
 | 
			
		||||
	va_end(arg);
 | 
			
		||||
	if (! strcmp(verbose, "assert") || atoi(verbose) > 1)
 | 
			
		||||
#ifdef ALSA_DEBUG_ASSERT
 | 
			
		||||
	verbose = getenv("LIBASOUND_DEBUG_ASSERT");
 | 
			
		||||
	if (verbose && *verbose)
 | 
			
		||||
		assert(0);
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue