aboutsummaryrefslogtreecommitdiffstats
path: root/src/myfprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/myfprintf.c')
-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);