Replace fclose+fopen with freopen where possible

This commit is contained in:
z3APA3A committed 2018-04-21 00:30:02 +03:00
1 parent 819d61f5b6
commit 50277692f4
4 files changed
+14 -25

No files matched your search

+1 -2
View File
@@ -614,8 +614,7 @@ int dobuf(struct clientparam * param, unsigned char * buf, const unsigned char *
time(&t);
if(!param) return 0;
if(param->trafcountfunc)(*param->trafcountfunc)(param);
format = (char *)param->srv->logformat;
if(!format) format = "G%y%m%d%H%M%S.%. %p %E %U %C:%c %R:%r %O %I %h %T";
format = param->srv->logformat?(char *)param->srv->logformat : DEFLOGFORMAT;
tm = (*format == 'G' || *format == 'g')?
gmtime(&t) : localtime(&t);
i = dobuf2(param, buf, s, doublec, tm, format + 1);