From 92f35b99a079b545c2340070c14fb1e09e38fafd Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 20 Sep 2021 12:17:53 +0200 Subject: [PATCH] alsa: don't mix process return and alsa err Use a separate error field for the alsa errors, we already use the res field for the process result. --- spa/plugins/alsa/alsa-seq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spa/plugins/alsa/alsa-seq.c b/spa/plugins/alsa/alsa-seq.c index 006fce2a7..6be92c9cb 100644 --- a/spa/plugins/alsa/alsa-seq.c +++ b/spa/plugins/alsa/alsa-seq.c @@ -627,7 +627,7 @@ static int process_write(struct seq_state *state) { struct seq_stream *stream = &state->streams[SPA_DIRECTION_INPUT]; uint32_t i; - int res = 0; + int err, res = 0; for (i = 0; i < stream->last_port; i++) { struct seq_port *port = &stream->ports[i]; @@ -690,9 +690,9 @@ static int process_write(struct seq_state *state) spa_log_trace_fp(state->log, "event time:%"PRIu64" offset:%d size:%ld port:%d.%d", out_time, c->offset, size, port->addr.client, port->addr.port); - if ((res = snd_seq_event_output(state->event.hndl, &ev)) < 0) { + if ((err = snd_seq_event_output(state->event.hndl, &ev)) < 0) { spa_log_warn(state->log, "failed to output event: %s", - snd_strerror(res)); + snd_strerror(err)); } } }