All of lore.kernel.org
 help / color / mirror / Atom feed
* master - lvmlockctl: use inline initilizers
@ 2020-02-04 16:22 Zdenek Kabelac
  0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2020-02-04 16:22 UTC (permalink / raw)
  To: lvm-devel

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];




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-02-04 16:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04 16:22 master - lvmlockctl: use inline initilizers Zdenek Kabelac

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.