Skip to content

Commit 771febc

Browse files
committed
A small cleanup
1 parent 3d67156 commit 771febc

File tree

1 file changed

+4
-8
lines changed
  • lldb/source/Host/macosx/objcxx

1 file changed

+4
-8
lines changed

lldb/source/Host/macosx/objcxx/Host.mm

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -624,16 +624,12 @@ DataExtractor data(arg_data.GetBytes(), arg_data_size,
624624

625625
Environment &proc_env = process_info.GetEnvironment();
626626
bool is_simulator = false;
627-
while ((cstr = data.GetCStr(&offset))) {
628-
if (cstr[0] == '\0')
629-
break;
630-
627+
for (llvm::StringRef env_var;
628+
!(env_var = data.GetCStr(&offset)).empty();) {
631629
if (check_for_ios_simulator &&
632-
strncmp(cstr, "SIMULATOR_UDID=", strlen("SIMULATOR_UDID=")) ==
633-
0)
630+
env_var.starts_with("SIMULATOR_UDID="))
634631
is_simulator = true;
635-
636-
proc_env.insert(cstr);
632+
proc_env.insert(env_var);
637633
}
638634
llvm::Triple &triple = process_info.GetArchitecture().GetTriple();
639635
if (is_simulator) {

0 commit comments

Comments
 (0)