summaryrefslogtreecommitdiff
path: root/Userland/Utilities/sed.cpp
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-03-01 17:24:50 +0100
committerLinus Groh <mail@linusgroh.de>2023-03-13 15:16:20 +0000
commitae51c1821c0d32ba40b866d8e5561f6de3359b17 (patch)
tree6bd2d0964841bf5bd56797ad4a887e8e4e3ac63c /Userland/Utilities/sed.cpp
parent26516ee1601b0662bb1753f834a179bf1a20082d (diff)
downloadserenity-ae51c1821c0d32ba40b866d8e5561f6de3359b17.zip
Everywhere: Remove unintentional partial stream reads and writes
Diffstat (limited to 'Userland/Utilities/sed.cpp')
-rw-r--r--Userland/Utilities/sed.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Utilities/sed.cpp b/Userland/Utilities/sed.cpp
index a978896bc7..8ecf6540aa 100644
--- a/Userland/Utilities/sed.cpp
+++ b/Userland/Utilities/sed.cpp
@@ -141,9 +141,8 @@ ErrorOr<int> serenity_main(Main::Arguments args)
if (maybe_output_file.has_value()) {
auto const& output_file = maybe_output_file.value();
- // FIXME: This should write the entire span.
- TRY(output_file->write_some(result.bytes()));
- TRY(output_file->write_some("\n"sv.bytes()));
+ TRY(output_file->write_until_depleted(result.bytes()));
+ TRY(output_file->write_until_depleted("\n"sv.bytes()));
}
}
}