[PATCH 24/30] bufused is assigned 0 in preceding source line

Zdenek Kabelac <[email protected]>
Newsgroups dev.linux.lists.lvm-devel
Message-ID <ccf3cb5bb9c8c7fe9256fd60d748b5aae2d4512d.1287994530.git.zkabelac@redhat.com>
clang Idempotent operation

Signed-off-by: Zdenek Kabelac <[email protected]>
---
 lib/log/log.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/log/log.c b/lib/log/log.c
index 5c49586..86b4988 100644
--- a/lib/log/log.c
+++ b/lib/log/log.c
@@ -359,7 +359,7 @@ void print_log(int level, const char *file, int line, int dm_errno,
 		_already_logging = 1;
 		memset(&buf, ' ', sizeof(buf));
 		bufused = 0;
-		if ((n = dm_snprintf(buf, sizeof(buf) - bufused - 1,
+		if ((n = dm_snprintf(buf, sizeof(buf) - 1,
 				      "%s:%d %s%s", file, line, log_command_name(),
 				      _msg_prefix)) == -1)
 			goto done;
-- 
1.7.3.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.