subproc: type + const string& in the iterator

This commit is contained in:
Robert Swiecki 2022-08-09 10:44:25 +02:00
parent 8e3ca99c3f
commit 38fcf4f752

View File

@ -139,9 +139,9 @@ static bool resetEnv(void) {
static const char kSubprocDoneChar = 'D'; static const char kSubprocDoneChar = 'D';
static const char kSubprocErrorChar = 'E'; static const char kSubprocErrorChar = 'E';
static const std::string contactArgs(const std::vector<const char*>& argv) { static const std::string concatArgs(const std::vector<const char*>& argv) {
std::string ret; std::string ret;
for (auto s : argv) { for (const auto& s : argv) {
if (s) { if (s) {
if (!ret.empty()) { if (!ret.empty()) {
ret.append(", "); ret.append(", ");
@ -203,7 +203,7 @@ static void subprocNewProc(
} }
argv.push_back(nullptr); argv.push_back(nullptr);
LOG_D("Exec: '%s', Args: [%s]", nsjconf->exec_file.c_str(), contactArgs(argv).c_str()); LOG_D("Exec: '%s', Args: [%s]", nsjconf->exec_file.c_str(), concatArgs(argv).c_str());
/* Should be the last one in the sequence */ /* Should be the last one in the sequence */
if (!sandbox::applyPolicy(nsjconf)) { if (!sandbox::applyPolicy(nsjconf)) {