1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

LibCore: CIODevice::set_error() is meant to be called with the 'errno'

The point of this function is to stash away the innermost error code
so that we don't lose it by the time we get back to the client code.
This commit is contained in:
Andreas Kling 2019-08-17 11:07:15 +02:00
parent 910fab564e
commit 7127c4fdbb
4 changed files with 5 additions and 5 deletions

View file

@ -15,7 +15,7 @@ CTCPSocket::CTCPSocket(CObject* parent)
{
int fd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0);
if (fd < 0) {
set_error(fd);
set_error(errno);
} else {
set_fd(fd);
set_mode(CIODevice::ReadWrite);