Skip to content

Commit 647e8d8

Browse files
authored
[lldb][OpenBSD] Make use of Environment class (#122040)
1 parent 3c2fc7a commit 647e8d8

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

lldb/source/Host/openbsd/Host.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,7 @@ namespace lldb_private {
4141
class ProcessLaunchInfo;
4242
}
4343

44-
Environment Host::GetEnvironment() {
45-
Environment env;
46-
char *v;
47-
char **var = environ;
48-
for (; var != NULL && *var != NULL; ++var) {
49-
v = strchr(*var, (int)'-');
50-
if (v == NULL)
51-
continue;
52-
env.insert(v);
53-
}
54-
return env;
55-
}
44+
Environment Host::GetEnvironment() { return Environment(environ); }
5645

5746
static bool
5847
GetOpenBSDProcessArgs(const ProcessInstanceInfoMatch *match_info_ptr,

0 commit comments

Comments
 (0)