mirror of
https://github.com/FAUSheppy/colorredstderr-mirror
synced 2025-12-10 08:58:33 +01:00
Fix initialization if ENV_NAME_FDS was not set.
If ENV_NAME_FDS is not set then init_from_environment() was called for each hooked function, instead of just once.
This commit is contained in:
@@ -34,6 +34,7 @@ static size_t tracked_fds_space;
|
||||
* ENV_NAME_FDS has the following format: Each descriptor as string followed
|
||||
* by a comma; there's a trailing comma. Example: "2,4,". */
|
||||
static void init_from_environment(void) {
|
||||
initialized = 1;
|
||||
tracked_fds_count = 0;
|
||||
|
||||
const char *env = getenv(ENV_NAME_FDS);
|
||||
|
||||
Reference in New Issue
Block a user