Skip to content

Commit 27d747a

Browse files
committedSep 17, 2021
8273877: os::unsetenv unused
Reviewed-by: mdoerr, stuefe
1 parent 35f6f1d commit 27d747a

File tree

3 files changed

+0
-13
lines changed

3 files changed

+0
-13
lines changed
 

‎src/hotspot/os/posix/os_posix.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,6 @@ int os::get_native_stack(address* stack, int frames, int toSkip) {
160160
return num_of_frames;
161161
}
162162

163-
164-
bool os::unsetenv(const char* name) {
165-
assert(name != NULL, "Null pointer");
166-
return (::unsetenv(name) == 0);
167-
}
168-
169163
int os::get_last_error() {
170164
return errno;
171165
}

‎src/hotspot/os/windows/os_windows.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,6 @@ static BOOL unmapViewOfFile(LPCVOID lpBaseAddress) {
258258
return result;
259259
}
260260

261-
bool os::unsetenv(const char* name) {
262-
assert(name != NULL, "Null pointer");
263-
return (SetEnvironmentVariable(name, NULL) == TRUE);
264-
}
265-
266261
char** os::get_environ() { return _environ; }
267262

268263
// No setuid programs under Windows.

‎src/hotspot/share/runtime/os.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ class os: AllStatic {
186186
static jint init_2(void); // Called after command line parsing
187187
// and VM ergonomics processing
188188

189-
// unset environment variable
190-
static bool unsetenv(const char* name);
191189
// Get environ pointer, platform independently
192190
static char** get_environ();
193191

0 commit comments

Comments
 (0)
Please sign in to comment.