Commit 26c09244 authored by Dimitris Papastamos's avatar Dimitris Papastamos Committed by Max Kellermann

sndio: Eliminate remaining goto usage to conform to MPD style

parent d4f801a8
......@@ -143,7 +143,8 @@ SndioOutput::Open(AudioFormat &audio_format, gcc_unused Error &error)
!sio_getpar(sio_hdl, &par)) {
error.Format(sndio_output_domain, -1,
"Failed to set/get audio params");
goto err;
sio_close(sio_hdl);
return false;
}
if (par.bits != bits ||
......@@ -154,19 +155,18 @@ SndioOutput::Open(AudioFormat &audio_format, gcc_unused Error &error)
par.le != SIO_LE_NATIVE) {
error.Format(sndio_output_domain, -1,
"Requested audio params cannot be satisfied");
goto err;
sio_close(sio_hdl);
return false;
}
if (!sio_start(sio_hdl)) {
error.Format(sndio_output_domain, -1,
"Failed to start audio device");
goto err;
sio_close(sio_hdl);
return false;
}
return true;
err:
sio_close(sio_hdl);
return false;
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment