aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-04-13 19:55:00 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-04-13 19:55:00 +0000
commite4ef4ea6aaffae5e5124da86fcaacf7a840d4108 (patch)
tree30e8130793f45030eed1b62e7d741e4c94c4b2a8
parent72e06e05a19c86b919b5ff389911afc1a73d19b3 (diff)
downloadmpd-e4ef4ea6aaffae5e5124da86fcaacf7a840d4108.tar.gz
mpd-e4ef4ea6aaffae5e5124da86fcaacf7a840d4108.tar.xz
mpd-e4ef4ea6aaffae5e5124da86fcaacf7a840d4108.zip
make some code look neater
git-svn-id: https://svn.musicpd.org/mpd/trunk@738 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/myfprintf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/myfprintf.c b/src/myfprintf.c
index 77c11a297..37ce1257c 100644
--- a/src/myfprintf.c
+++ b/src/myfprintf.c
@@ -76,11 +76,11 @@ void myfprintf(FILE * fp, char * format, ... ) {
}
else {
vsnprintf(buffer,BUFFER_LENGTH,format,arglist);
- if((fcntlret & O_NONBLOCK) &&
- interfacePrintWithFD(fd,buffer)==0)
+ if(!(fcntlret & O_NONBLOCK) ||
+ interfacePrintWithFD(fd,buffer)<0)
{
+ blockingWrite(fd,buffer);
}
- else blockingWrite(fd,buffer);
}
va_end(arglist);