On (22/01/15 13:27), Pavel Reichl wrote:
Hello, please see this trivial patch. Thanks!
From b2efdde00cb6b2e7ff4860b06e4902d40ffa461c Mon Sep 17 00:00:00
2001
From: Pavel Reichl <preichl(a)redhat.com>
Date: Thu, 22 Jan 2015 07:22:42 -0500
Subject: [PATCH] TOOLS: add missing '\n' in debug messages
---
src/tools/sss_cache.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/tools/sss_cache.c b/src/tools/sss_cache.c
index e6faf2d745c011c6c378f426adee040e25e13f1a..c9bf2491490032cef23e4686aab59391daaa621c
100644
--- a/src/tools/sss_cache.c
+++ b/src/tools/sss_cache.c
@@ -426,15 +426,16 @@ static bool invalidate_entries(TALLOC_CTX *ctx,
c_name = ldb_msg_find_attr_as_string(msgs[i], SYSDB_NAME, NULL);
if (c_name == NULL) {
DEBUG(SSSDBG_MINOR_FAILURE,
- "Something bad happened, can't find attribute %s",
SYSDB_NAME);
- ERROR("Couldn't invalidate %1$s", type_string);
+ "Something bad happened, can't find attribute %s\n",
+ SYSDB_NAME);
+ ERROR("Couldn't invalidate %1$s\n", type_string);
iret = false;
} else {
ret = invalidate_entry(ctx, dinfo, c_name, entry_type);
if (ret != EOK) {
DEBUG(SSSDBG_MINOR_FAILURE,
- "Couldn't invalidate %s %s", type_string, c_name);
- ERROR("Couldn't invalidate %1$s %2$s", type_string,
c_name);
+ "Couldn't invalidate %s %s\n", type_string, c_name);
+ ERROR("Couldn't invalidate %1$s %2$s\n", type_string,
c_name);
iret = false;
ACK to this patch because it fixed missing newline in tools (macro ERROR).
There are many missing newlines in DEBUG macros.
I have WIP clang based tool to check missing new line in sssd code.
But there are corner cases and usage is not user friendly.
If we want I can send generated patch which fixes all DEBUG messages.
BTW:
http://sssd-ci.duckdns.org/logs/job/6/58/summary.html
LS