From 5c3def51a429bdebbcbd862cdabe3eb2dc3ff9f1 Mon Sep 17 00:00:00 2001 From: Daniel Nouri Date: Sun, 5 Oct 2025 00:21:24 +0200 Subject: [PATCH] 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. --- spa/plugins/alsa/acp/test-alsa-path-select.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/spa/plugins/alsa/acp/test-alsa-path-select.c b/spa/plugins/alsa/acp/test-alsa-path-select.c index f30662d50..e9bf4b3cc 100644 --- a/spa/plugins/alsa/acp/test-alsa-path-select.c +++ b/spa/plugins/alsa/acp/test-alsa-path-select.c @@ -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");