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

LibC: Change putenv (and getenv) to not copy, but directly return the environ values.

This is in keeping with how putenv should function. It does mean that
the shell's export command now leaks, but that's not a difficult fix.

Contributes to #29.
This commit is contained in:
Robin Burchell 2019-05-16 13:04:47 +02:00 committed by Andreas Kling
parent c5434e0cfa
commit b2dd12daac
4 changed files with 59 additions and 47 deletions

View file

@ -293,6 +293,8 @@ void rewind(FILE* stream)
int dbgprintf(const char* fmt, ...)
{
// if this fails, you're printing too early.
ASSERT(stddbg);
va_list ap;
va_start(ap, fmt);
int ret = vfprintf(stddbg, fmt, ap);