From 56b4f131c4bc89452e9a7ce6472a822a467ffda0 Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Mon, 5 Feb 2024 15:38:36 -0600 Subject: [PATCH] Lint (#124) Signed-off-by: Michael Carroll --- include/gz/utils/detail/subprocess.h | 4 ++-- src/Environment.cc | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/gz/utils/detail/subprocess.h b/include/gz/utils/detail/subprocess.h index 7077ffe..137aa14 100644 --- a/include/gz/utils/detail/subprocess.h +++ b/include/gz/utils/detail/subprocess.h @@ -187,7 +187,7 @@ subprocess_weak int subprocess_terminate(struct subprocess_s *const process); /// /// The only safe way to read from the standard output of a process during it's /// execution is to use the `subprocess_option_enable_async` option in -/// conjuction with this method. +/// conjunction with this method. subprocess_weak unsigned subprocess_read_stdout(struct subprocess_s *const process, char *const buffer, unsigned size); @@ -201,7 +201,7 @@ subprocess_read_stdout(struct subprocess_s *const process, char *const buffer, /// /// The only safe way to read from the standard error of a process during it's /// execution is to use the `subprocess_option_enable_async` option in -/// conjuction with this method. +/// conjunction with this method. subprocess_weak unsigned subprocess_read_stderr(struct subprocess_s *const process, char *const buffer, unsigned size); diff --git a/src/Environment.cc b/src/Environment.cc index d477414..7daace5 100644 --- a/src/Environment.cc +++ b/src/Environment.cc @@ -20,6 +20,7 @@ #include #include #include +#include #include #ifdef _WIN32 @@ -189,7 +190,9 @@ EnvironmentStrings envMapToStrings(const EnvironmentMap &_envMap) std::sort(sorted.begin(), sorted.end()); for (auto [key, value] : sorted) { - ret.push_back(key + "=" + value); + key += '='; + key += value; + ret.push_back(key); } return ret; }