Skip to content

Commit

Permalink
8266087: Move 'buffer' declaration in get_user_name_slow() inside of …
Browse files Browse the repository at this point in the history
…linux specific code

Reviewed-by: zgu, dcubed
  • Loading branch information
Harold Seigel committed Apr 28, 2021
1 parent ec383ab commit f40bf1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hotspot/os/posix/perfMemory_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,10 +527,10 @@ static char* get_user_name_slow(int vmid, int nspid, TRAPS) {
// directory search
char* oldest_user = NULL;
time_t oldest_ctime = 0;
char buffer[MAXPATHLEN + 1];
int searchpid;
char* tmpdirname = (char *)os::get_temp_directory();
#if defined(LINUX)
char buffer[MAXPATHLEN + 1];
assert(strlen(tmpdirname) == 4, "No longer using /tmp - update buffer size");

// On Linux, if nspid != -1, look in /proc/{vmid}/root/tmp for directories
Expand Down

1 comment on commit f40bf1d

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.