mirror of
https://github.com/audacity/linuxdeploy.git
synced 2026-04-17 08:32:53 -05:00
Use classic C string handling
That way, we don't have to allocate memory, and it's also shorter.
This commit is contained in:
@@ -177,9 +177,7 @@ std::vector<char*> process::make_env_vector_(const subprocess_env_map_t& env) {
|
||||
throw std::runtime_error{"no equal sign in environment variable"};
|
||||
}
|
||||
|
||||
std::string existing_env_var_name{existing_env_var, 0, static_cast<size_t>(equal_sign - existing_env_var)};
|
||||
|
||||
return existing_env_var_name == key;
|
||||
return strncmp(existing_env_var, key.c_str(), equal_sign - existing_env_var) == 0;
|
||||
};
|
||||
|
||||
// delete existing env var, if any
|
||||
|
||||
Reference in New Issue
Block a user