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
This commit is contained in:
parent
bf9d8a0bbe
commit
fb175591c3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user