clean-up a wee-bit of code

git-svn-id: https://svn.musicpd.org/mpd/trunk@895 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes 2004-04-29 19:34:30 +00:00
parent 22058b9b61
commit 37db643217
1 changed files with 7 additions and 2 deletions

View File

@ -44,8 +44,13 @@ void blockingWrite(int fd, char * string) {
while(len) {
ret = write(fd,string,len);
if(ret<0) {
if(errno==EAGAIN || errno==EINTR) continue;
return;
switch(errno) {
case EAGAIN:
case EINTR:
continue;
default:
return;
}
}
len-= ret;
string+= ret;