File 0001-alsactl-save-state-do-not-call-rename-for-stdio.patch of Package alsa-utils

From 03a652e18ddc2eaad9b6ff3653515d54bd273d75 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 25 Jun 2014 10:47:21 +0200
Subject: [PATCH 1/2] alsactl: save state - do not call rename for stdio

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
 alsactl/state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/alsactl/state.c b/alsactl/state.c
index c33f5017999f..e0c6f2e02e9b 100644
--- a/alsactl/state.c
+++ b/alsactl/state.c
@@ -1626,7 +1626,7 @@ int save_state(const char *file, const char *cardname)
 	snd_output_close(out);
 	if (err < 0) {
 		error("snd_config_save: %s", snd_strerror(err));
-	} else {
+	} else if (nfile) {
 		err = rename(nfile, file);
 		if (err < 0)
 			error("rename failed: %s (%s)", strerror(-err), file);
-- 
2.0.0
openSUSE Build Service is sponsored by