LibCore: Save errno before it gets clobbered in Core::IODevice::write()
This commit is contained in:
parent
06353077b7
commit
2146d22432
Notes:
sideshowbarker
2024-07-18 20:34:23 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/2146d22432e
1 changed files with 1 additions and 1 deletions
|
@ -281,8 +281,8 @@ bool IODevice::write(const u8* data, int size)
|
|||
{
|
||||
int rc = ::write(m_fd, data, size);
|
||||
if (rc < 0) {
|
||||
perror("IODevice::write: write");
|
||||
set_error(errno);
|
||||
perror("IODevice::write: write");
|
||||
return false;
|
||||
}
|
||||
return rc == size;
|
||||
|
|
Loading…
Add table
Reference in a new issue