]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
log: Use unlocked variants of stdio functions
authorJeff Lucovsky <jeff@lucovsky.org>
Fri, 7 Aug 2020 12:34:20 +0000 (08:34 -0400)
committerVictor Julien <victor@inliniac.net>
Mon, 7 Sep 2020 05:10:48 +0000 (07:10 +0200)
This commit uses the unlocked variants of additional stdio functions

src/util-logopenfile.c

index feee704a2ccaff339e2d67ae82820276d7d5fc16..3e85e605ac37a5a918d2dfd2c662185357949121 100644 (file)
@@ -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;