Commit fb175591 authored by Eric Wong's avatar Eric Wong

don't check errno unless we have an error (ret<0) from write()

git-svn-id: https://svn.musicpd.org/mpd/trunk@3382 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent bf9d8a0b
......@@ -524,8 +524,8 @@ static int oss_playAudio(AudioOutput * audioOutput, char * playChunk,
while (size > 0) {
ret = write(od->fd, playChunk, size);
if(errno == EINTR) continue;
if(ret<0) {
if(errno == EINTR) continue;
ERROR("closing oss device \"%s\" due to write error: "
"%s\n", od->device, strerror(errno));
oss_closeDevice(audioOutput);
......
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