Skip to content

Instantly share code, notes, and snippets.

@Yamakuzure
Created April 5, 2019 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yamakuzure/24a344d1017046985b200801e97dd590 to your computer and use it in GitHub Desktop.
Save Yamakuzure/24a344d1017046985b200801e97dd590 to your computer and use it in GitHub Desktop.
diff --git a/src/basic/fileio.c b/src/basic/fileio.c
index e981cd024..2d669b4e1 100644
--- a/src/basic/fileio.c
+++ b/src/basic/fileio.c
@@ -164,11 +164,11 @@ int write_string_file_ts(
}
}
- (void) __fsetlocking(f, FSETLOCKING_BYCALLER);
-
if (flags & WRITE_STRING_FILE_DISABLE_BUFFER)
setvbuf(f, NULL, _IONBF, 0);
+ (void) __fsetlocking(f, FSETLOCKING_BYCALLER);
+
r = write_string_stream_ts(f, line, flags, ts);
if (r < 0)
goto fail;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment