mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	device-manager: Add an assertion to get rid of a warning from Coverity.
Coverity thinks that device_name can be NULL when it's dereferenced by strcmp. Adding an assertion doesn't hurt here (in my opinion), and that should get rid of the warning.
This commit is contained in:
		
							parent
							
								
									9d640e4491
								
							
						
					
					
						commit
						8747930747
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -576,7 +576,7 @@ static void update_highest_priority_device_indexes(struct userdata *u, const cha
 | 
			
		|||
            struct entry *e;
 | 
			
		||||
 | 
			
		||||
            name = pa_xstrndup(key.data, key.size);
 | 
			
		||||
            device_name = get_name(name, prefix);
 | 
			
		||||
            pa_assert_se(device_name = get_name(name, prefix));
 | 
			
		||||
 | 
			
		||||
            if ((e = entry_read(u, name))) {
 | 
			
		||||
                for (uint32_t i = 0; i < NUM_ROLES; ++i) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue