From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Aring Date: Fri, 17 Mar 2023 16:41:01 -0400 Subject: [Cluster-devel] [PATCH 2/3] dlm_controld: get rid of unnecessary memset In-Reply-To: <20230317204102.1776638-1-aahringo@redhat.com> References: <20230317204102.1776638-1-aahringo@redhat.com> Message-ID: <20230317204102.1776638-3-aahringo@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: Andreas Gruenbacher In process_plocks(), we're reading in the entire info object, so there is no need to zero out the buffer first. --- dlm_controld/plock.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dlm_controld/plock.c b/dlm_controld/plock.c index f03f3abe..85d6fdf2 100644 --- a/dlm_controld/plock.c +++ b/dlm_controld/plock.c @@ -1523,8 +1523,6 @@ void process_plocks(int ci) gettimeofday(&now, NULL); - memset(&info, 0, sizeof(info)); - rv = do_read(plock_device_fd, &info, sizeof(info)); if (rv < 0) { log_debug("process_plocks: read error %d fd %d\n", -- 2.31.1