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:
Daniel Nouri 2025-10-05 00:21:24 +02:00
parent 571ff40704
commit 5c3def51a4

View file

@ -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");