From 7f2f0d14c651ae729bdad112c37f7c484a2adaeb Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 3 Nov 2022 07:53:11 -0400 Subject: [PATCH] minor codestyle fixes Signed-off-by: Steffen Vogel --- include/villas/node.hpp | 6 ++---- lib/nodes/exec.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/include/villas/node.hpp b/include/villas/node.hpp index 77fc2d407..9bc249379 100644 --- a/include/villas/node.hpp +++ b/include/villas/node.hpp @@ -411,14 +411,12 @@ public: return 0; } - bool - isInternal() const + bool isInternal() const { return getFlags() & (int) Flags::INTERNAL; } - bool - isHidden() const + bool isHidden() const { return isInternal() || getFlags() & (int) Flags::HIDDEN; } diff --git a/lib/nodes/exec.cpp b/lib/nodes/exec.cpp index 6174aeb84..d5f11541b 100644 --- a/lib/nodes/exec.cpp +++ b/lib/nodes/exec.cpp @@ -181,13 +181,13 @@ int ExecNode::_write(struct Sample * smps[], unsigned cnt) const std::string & ExecNode::getDetails() { - std::string wd = working_dir; - if (wd.empty()) { - char buf[128]; - wd = getcwd(buf, sizeof(buf)); - } - if (details.empty()) { + std::string wd = working_dir; + if (wd.empty()) { + char buf[128]; + wd = getcwd(buf, sizeof(buf)); + } + details = fmt::format("exec={}, shell={}, flush={}, #environment={}, #arguments={}, working_dir={}", command, shell ? "yes" : "no",