From 38fcf4f752b31d5b3bc5806131dd71a8222fc817 Mon Sep 17 00:00:00 2001 From: Robert Swiecki Date: Tue, 9 Aug 2022 10:44:25 +0200 Subject: [PATCH] subproc: type + const string& in the iterator --- subproc.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subproc.cc b/subproc.cc index 2fc3b54..76ef57f 100644 --- a/subproc.cc +++ b/subproc.cc @@ -139,9 +139,9 @@ static bool resetEnv(void) { static const char kSubprocDoneChar = 'D'; static const char kSubprocErrorChar = 'E'; -static const std::string contactArgs(const std::vector& argv) { +static const std::string concatArgs(const std::vector& argv) { std::string ret; - for (auto s : argv) { + for (const auto& s : argv) { if (s) { if (!ret.empty()) { ret.append(", "); @@ -203,7 +203,7 @@ static void subprocNewProc( } 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 */ if (!sandbox::applyPolicy(nsjconf)) {