aboutsummaryrefslogtreecommitdiffstats
path: root/src/myfprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/myfprintf.c')
-rw-r--r--src/myfprintf.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/myfprintf.c b/src/myfprintf.c
index e2c366a1d..e73f307f9 100644
--- a/src/myfprintf.c
+++ b/src/myfprintf.c
@@ -74,13 +74,15 @@ void myfprintf(FILE * fp, char * format, ... ) {
memset(buffer,0,BUFFER_LENGTH+1);
va_start(arglist,format);
- if(myfprintf_stdLogMode && (fd==1 || fd==2)) {
- time_t t = time(NULL);
- if(fd==1) fp = myfprintf_out;
- else fp = myfprintf_err;
- strftime(buffer,14,"%b %e %R",localtime(&t));
- blockingWrite(fd,buffer,strlen(buffer));
- blockingWrite(fd," : ",3);
+ if(fd==1 || fd==2) {
+ if(myfprintf_stdLogMode) {
+ time_t t = time(NULL);
+ if(fd==1) fp = myfprintf_out;
+ else fp = myfprintf_err;
+ strftime(buffer,14,"%b %e %R",localtime(&t));
+ blockingWrite(fd,buffer,strlen(buffer));
+ blockingWrite(fd," : ",3);
+ }
vsnprintf(buffer,BUFFER_LENGTH,format,arglist);
blockingWrite(fd,buffer,strlen(buffer));
}