mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-10-29 05:40:27 -04:00 
			
		
		
		
	refactor: Remove redundant ret assignments in test-alsa-path-select
The variable ret is initialized to 2 at function entry. Error paths that want this default value can simply goto cleanup without reassigning it.
This commit is contained in:
		
							parent
							
								
									571ff40704
								
							
						
					
					
						commit
						5c3def51a4
					
				
					 1 changed files with 0 additions and 2 deletions
				
			
		|  | @ -274,7 +274,6 @@ int main(int argc, char *argv[]) | ||||||
| 	if (mute_switch_count == 0) { | 	if (mute_switch_count == 0) { | ||||||
| 		fprintf(stderr, "Warning: No mute switches found in path\n"); | 		fprintf(stderr, "Warning: No mute switches found in path\n"); | ||||||
| 		printf("This test requires a path with switch=mute elements\n"); | 		printf("This test requires a path with switch=mute elements\n"); | ||||||
| 		ret = 2; |  | ||||||
| 		goto cleanup; | 		goto cleanup; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | @ -285,7 +284,6 @@ int main(int argc, char *argv[]) | ||||||
| 	err = pa_alsa_path_select(path, NULL, mixer, config.device_muted); | 	err = pa_alsa_path_select(path, NULL, mixer, config.device_muted); | ||||||
| 	if (err < 0) { | 	if (err < 0) { | ||||||
| 		fprintf(stderr, "Error: pa_alsa_path_select() failed with error %d\n", err); | 		fprintf(stderr, "Error: pa_alsa_path_select() failed with error %d\n", err); | ||||||
| 		ret = 2; |  | ||||||
| 		goto cleanup; | 		goto cleanup; | ||||||
| 	} | 	} | ||||||
| 	printf("pa_alsa_path_select(): OK\n\n"); | 	printf("pa_alsa_path_select(): OK\n\n"); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Daniel Nouri
						Daniel Nouri