From 5c40e81a7e6a42e40a49c89758f8e9fd269de8d7 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sat, 17 Mar 2018 14:13:30 +0100 Subject: [PATCH] cleanup: use direct initializer --- daemons/lvmetad/lvmetad-core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c index eeb3f206c..66a6b8291 100644 --- a/daemons/lvmetad/lvmetad-core.c +++ b/daemons/lvmetad/lvmetad-core.c @@ -2421,14 +2421,11 @@ static response set_global_info(lvmetad_state *s, request r) static response get_global_info(lvmetad_state *s, request r) { - char reason[REASON_BUF_SIZE]; + /* This buffer should be large enough to hold all the possible reasons. */ + char reason[REASON_BUF_SIZE] = { 0 }; char flag_str[64]; int pid; - /* This buffer should be large enough to hold all the possible reasons. */ - - memset(reason, 0, sizeof(reason)); - pid = (int)daemon_request_int(r, "pid", 0); if (s->flags & GLFL_DISABLE) {