1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:37:43 +00:00

LibC: Remove a leftover default_stream

Long ago, there was a fourth stdio default stream, stddbg, connected to the
debug console. It has since been replaced by the dbgputstr() and dbgputch()
syscalls.

3fce2fb205

Remove the last remains of stddbg, as fd 3 is soon going to be reused for socket
takeover.
This commit is contained in:
Sergey Bugaev 2019-11-26 18:44:27 +03:00 committed by Andreas Kling
parent 9a6d506ac8
commit b64cee4589

View file

@ -15,7 +15,7 @@
extern "C" { extern "C" {
static FILE __default_streams[4]; static FILE __default_streams[3];
FILE* stdin; FILE* stdin;
FILE* stdout; FILE* stdout;
FILE* stderr; FILE* stderr;
@ -483,7 +483,7 @@ int fclose(FILE* stream)
{ {
fflush(stream); fflush(stream);
int rc = close(stream->fd); int rc = close(stream->fd);
if (stream != &__default_streams[0] && stream != &__default_streams[1] && stream != &__default_streams[2] && stream != &__default_streams[3]) if (stream != &__default_streams[0] && stream != &__default_streams[1] && stream != &__default_streams[2])
free(stream); free(stream);
return rc; return rc;
} }