From 23e28e32c257da0d657e62fe76a26550bc1ea6d1 Mon Sep 17 00:00:00 2001 From: Mark Stemm Date: Wed, 3 Jul 2019 17:14:36 -0700 Subject: [PATCH] Don't add newline to error Instead, add it to the message printed containing the error. --- userspace/engine/rules.cpp | 2 +- userspace/falco/falco.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/userspace/engine/rules.cpp b/userspace/engine/rules.cpp index 1125880e..da2a5f2d 100644 --- a/userspace/engine/rules.cpp +++ b/userspace/engine/rules.cpp @@ -227,7 +227,7 @@ std::string falco_rules::get_context(const std::string &content, uint64_t lineno { ret += " "; } - ret += "^\n"; + ret += "^"; return ret; } diff --git a/userspace/falco/falco.cpp b/userspace/falco/falco.cpp index e4d74f78..715a9aba 100644 --- a/userspace/falco/falco.cpp +++ b/userspace/falco/falco.cpp @@ -723,7 +723,7 @@ int falco_init(int argc, char **argv) } catch(falco_exception &e) { - printf("%s%s", prefix.c_str(), e.what()); + printf("%s%s\n", prefix.c_str(), e.what()); throw; } printf("%sOk\n", prefix.c_str());