From: Jeff Lucovsky Date: Fri, 7 Aug 2020 12:34:20 +0000 (-0400) Subject: log: Use unlocked variants of stdio functions X-Git-Tag: suricata-6.0.0-rc1~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cdd87f5ad7fc2e99dbbf1b2c2dc9c58723c0c1b;p=thirdparty%2Fsuricata.git log: Use unlocked variants of stdio functions This commit uses the unlocked variants of additional stdio functions --- diff --git a/src/util-logopenfile.c b/src/util-logopenfile.c index feee704a2c..3e85e605ac 100644 --- a/src/util-logopenfile.c +++ b/src/util-logopenfile.c @@ -209,9 +209,9 @@ static int SCLogFileWriteNoLock(const char *buffer, int buffer_len, LogFileCtx * } if (log_ctx->fp) { - clearerr(log_ctx->fp); + SCClearErrUnlocked(log_ctx->fp); ret = SCFwriteUnlocked(buffer, buffer_len, 1, log_ctx->fp); - fflush(log_ctx->fp); + SCFflushUnlocked(log_ctx->fp); } return ret;