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:
parent
22058b9b61
commit
37db643217
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user