summaryrefslogtreecommitdiff
path: root/lib/log
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2017-06-27 12:41:59 +0100
committerAlasdair G Kergon <agk@redhat.com>2017-06-27 12:41:59 +0100
commit7f1ec681d65001ed3c74a7c7239efa98a8507d88 (patch)
treed42e7bbf7847acc50898ba77f7b4b2cc8c560b44 /lib/log
parent3fe67217d46d2bb496b5c09b0314c7260ed6c24f (diff)
downloadlvm2-7f1ec681d65001ed3c74a7c7239efa98a8507d88.tar.gz
log: fix message prefix truncation
Restore the 29-character prefix limit that commit e907535ab977ea29319aeb015cec6c06729f7ce4 ("coverity: use better function") accidentally reduced to 28 characters.
Diffstat (limited to 'lib/log')
-rw-r--r--lib/log/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/log/log.c b/lib/log/log.c
index 8f52623ca..8ca60e4f9 100644
--- a/lib/log/log.c
+++ b/lib/log/log.c
@@ -376,7 +376,7 @@ void fin_syslog(void)
void init_msg_prefix(const char *prefix)
{
if (prefix)
- dm_strncpy(_msg_prefix, prefix, sizeof(_msg_prefix) - 1);
+ dm_strncpy(_msg_prefix, prefix, sizeof(_msg_prefix));
}
void init_indent(int indent)