aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-04-29 19:34:30 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-04-29 19:34:30 +0000
commit37db6432170914e377013bd93b6eae566acff518 (patch)
treecd9f84f96b7c64bae17c0f74e7b2b7e149f4797f
parent22058b9b61c836191376697fc8b799542f83a3aa (diff)
downloadmpd-37db6432170914e377013bd93b6eae566acff518.tar.gz
mpd-37db6432170914e377013bd93b6eae566acff518.tar.xz
mpd-37db6432170914e377013bd93b6eae566acff518.zip
clean-up a wee-bit of code
git-svn-id: https://svn.musicpd.org/mpd/trunk@895 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/myfprintf.c9
1 files 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;