diff --git a/src/primitive_core.cc b/src/primitive_core.cc index e484043ee..b962341b6 100644 --- a/src/primitive_core.cc +++ b/src/primitive_core.cc @@ -133,9 +133,8 @@ static Object* write_on_std(const uint8* bytes, size_t length, bool is_stdout, b fwrite_unlocked(bytes, 1, length, stream); if (newline) { fputc_unlocked('\n', stream); - } else { - fflush_unlocked(stream); } + fflush_unlocked(stream); funlockfile(stream); return process->null_object(); } @@ -147,9 +146,8 @@ static Object* write_on_std(const uint8* bytes, size_t length, bool is_stdout, b fwrite(bytes, 1, length, stream); if (newline) { fputc('\n', stream); - } else { - fflush(stream); } + fflush(stream); return process->null_object(); }