From 37db6432170914e377013bd93b6eae566acff518 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Thu, 29 Apr 2004 19:34:30 +0000 Subject: clean-up a wee-bit of code git-svn-id: https://svn.musicpd.org/mpd/trunk@895 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/myfprintf.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/myfprintf.c b/src/myfprintf.c index 0947531bb..42bc0049a 100644 --- a/src/myfprintf.c +++ b/src/myfprintf.c @@ -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; -- cgit v1.2.3