From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: master - lvmlockctl: use inline initilizers
Date: Tue, 4 Feb 2020 11:22:58 -0500 [thread overview]
Message-ID: <56095.120020411225101873@us-mta-225.us.mimecast.lan> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=91d16fc049ba2034708aa6a0bab5f548040dfd3b
Commit: 91d16fc049ba2034708aa6a0bab5f548040dfd3b
Parent: d01f27f41135189611d2030ec87ff5714eb259af
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Wed Jan 29 15:47:40 2020 +0100
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Tue Feb 4 17:22:06 2020 +0100
lvmlockctl: use inline initilizers
clang: ensure r_name[] is in all possible paths defined.
---
daemons/lvmlockd/lvmlockctl.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/daemons/lvmlockd/lvmlockctl.c b/daemons/lvmlockd/lvmlockctl.c
index 40432b5..c2a998c 100644
--- a/daemons/lvmlockd/lvmlockctl.c
+++ b/daemons/lvmlockd/lvmlockctl.c
@@ -280,13 +280,12 @@ static void format_info_line(char *line, char *r_name, char *r_type)
static void format_info(void)
{
- char line[MAX_LINE];
- char r_name[MAX_NAME+1];
- char r_type[MAX_NAME+1];
+ char line[MAX_LINE] = { 0 };
+ char r_name[MAX_NAME+1] = { 0 };
+ char r_type[MAX_NAME+1] = { 0 };
int i, j;
j = 0;
- memset(line, 0, sizeof(line));
for (i = 0; i < dump_len; i++) {
line[j++] = dump_buf[i];
reply other threads:[~2020-02-04 16:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56095.120020411225101873@us-mta-225.us.mimecast.lan \
--to=zkabelac@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.