diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-08-01 10:41:04 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-08-01 10:41:04 +0200 |
commit | 385e9268f4fcc1b54f194993308c0b4b38bf3ddc (patch) | |
tree | 2a147cc09ab5cf24bba5e2d630c3d132bb41d710 /Libraries/LibCore/CIODevice.cpp | |
parent | b9c8b3137d2c2e16caa6e21df03496c6db2b498d (diff) | |
download | serenity-385e9268f4fcc1b54f194993308c0b4b38bf3ddc.zip |
CIODevice: printf() thought it was calling ::write() but it was write()
There's some confusion between the write syscall and CIODevice::write()
here. The internal write() returns a boolean, and has already whined
in case the syscall failed, so we don't need to do that again.
Diffstat (limited to 'Libraries/LibCore/CIODevice.cpp')
-rw-r--r-- | Libraries/LibCore/CIODevice.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Libraries/LibCore/CIODevice.cpp b/Libraries/LibCore/CIODevice.cpp index a585e1a8dd..8c8fd57a33 100644 --- a/Libraries/LibCore/CIODevice.cpp +++ b/Libraries/LibCore/CIODevice.cpp @@ -249,9 +249,7 @@ int CIODevice::printf(const char* format, ...) va_start(ap, format); // FIXME: We're not propagating write() failures to client here! int ret = printf_internal([this](char*&, char ch) { - int rc = write((const u8*)&ch, 1); - if (rc < 0) - dbgprintf("CIODevice::printf: write: %s\n", strerror(errno)); + write((const u8*)&ch, 1); }, nullptr, format, ap); va_end(ap); |