mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	conf-parser: Remove redundant feof() call
fgets() returns NULL in case there's an error or f is at EOF. The while condition just checked that f is not at EOF, therefore an error must have happened.
This commit is contained in:
		
							parent
							
								
									259be540e3
								
							
						
					
					
						commit
						6733caf114
					
				
					 1 changed files with 0 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -185,9 +185,6 @@ int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_p
 | 
			
		|||
 | 
			
		||||
    while (!feof(f)) {
 | 
			
		||||
        if (!fgets(state.buf, sizeof(state.buf), f)) {
 | 
			
		||||
            if (feof(f))
 | 
			
		||||
                break;
 | 
			
		||||
 | 
			
		||||
            pa_log_warn("Failed to read configuration file '%s': %s", filename, pa_cstrerror(errno));
 | 
			
		||||
            goto finish;
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue