diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-04-13 19:55:00 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-04-13 19:55:00 +0000 |
commit | e4ef4ea6aaffae5e5124da86fcaacf7a840d4108 (patch) | |
tree | 30e8130793f45030eed1b62e7d741e4c94c4b2a8 /src/myfprintf.c | |
parent | 72e06e05a19c86b919b5ff389911afc1a73d19b3 (diff) | |
download | mpd-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.c | 6 |
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); |