summaryrefslogtreecommitdiff
path: root/libadhocutil/processPipes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libadhocutil/processPipes.cpp')
-rw-r--r--libadhocutil/processPipes.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libadhocutil/processPipes.cpp b/libadhocutil/processPipes.cpp
index 5e243d5..4973f9b 100644
--- a/libadhocutil/processPipes.cpp
+++ b/libadhocutil/processPipes.cpp
@@ -1,7 +1,7 @@
#include "processPipes.h"
#include <unistd.h>
#include <poll.h>
-#include <string.h>
+#include <cstring>
#include <sys/resource.h>
#include <stdexcept>
#include <sys.h>
@@ -17,7 +17,7 @@ pipe(int pipes[2], ScopeExit & tidyUp)
if (::pipe(pipes)) {
throw SystemException("pipe(2) failed", strerror(errno), errno);
}
- tidyUp.onFailure.push_back([pipes] {
+ tidyUp.onFailure.emplace_back([pipes] {
close(pipes[0]);
close(pipes[1]);
});
@@ -78,7 +78,7 @@ ProcessPipes::ProcessPipes(const std::vector<std::string> & args, bool i, bool o
for (const auto & p : args) {
*w++ = strdup(p.c_str());
}
- *w = NULL;
+ *w = nullptr;
if (*buf) {
execv(buf[0], buf);
}