mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-01-26 06:07:53 +00: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
e29d851d2c
commit
9ad6219db3
@ -274,7 +274,6 @@ int main(int argc, char *argv[])
|
||||
if (mute_switch_count == 0) {
|
||||
fprintf(stderr, "Warning: No mute switches found in path\n");
|
||||
printf("This test requires a path with switch=mute elements\n");
|
||||
ret = 2;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -285,7 +284,6 @@ int main(int argc, char *argv[])
|
||||
err = pa_alsa_path_select(path, NULL, mixer, config.device_muted);
|
||||
if (err < 0) {
|
||||
fprintf(stderr, "Error: pa_alsa_path_select() failed with error %d\n", err);
|
||||
ret = 2;
|
||||
goto cleanup;
|
||||
}
|
||||
printf("pa_alsa_path_select(): OK\n\n");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user