mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-13 05:48:39 +03:00
simplify win32_modenv
This commit is contained in:
parent
2e8f618f00
commit
0c7fc9b73c
@ -75,9 +75,6 @@ void win32_sleep(int ms) {
|
||||
}
|
||||
|
||||
int win32_modenv(const char* name, const char* value, int overwrite) {
|
||||
char buffer[2000];
|
||||
if (!overwrite && getenv(name)) return 0;
|
||||
if (strlen(name) + strlen(value) > 1998) return -1;
|
||||
sprintf(buffer, "%s=%s", name, value);
|
||||
return putenv(buffer);
|
||||
return _putenv_s(name, value);
|
||||
}
|
Loading…
Reference in New Issue
Block a user