Skip to content

Commit a8fbaca

Browse files
committed
A small cleanup
1 parent 3d67156 commit a8fbaca

File tree

1 file changed

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

1 file changed

+4
-7
lines changed

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -624,16 +624,13 @@ 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;
635632

636-
proc_env.insert(cstr);
633+
proc_env.insert(env_var);
637634
}
638635
llvm::Triple &triple = process_info.GetArchitecture().GetTriple();
639636
if (is_simulator) {

0 commit comments

Comments
 (0)