cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Alexander Aring <aahringo@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 2/3] dlm_controld: get rid of unnecessary memset
Date: Fri, 17 Mar 2023 16:41:01 -0400	[thread overview]
Message-ID: <20230317204102.1776638-3-aahringo@redhat.com> (raw)
In-Reply-To: <20230317204102.1776638-1-aahringo@redhat.com>

From: Andreas Gruenbacher <agruenba@redhat.com>

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


  parent reply	other threads:[~2023-03-17 20:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17 20:40 [Cluster-devel] [PATCH 0/3] dlm_controld: more plock fixes and cleanups Alexander Aring
2023-03-17 20:41 ` [Cluster-devel] [PATCH 1/3] dlm_controld: initialize waiter->flags Alexander Aring
2023-03-17 20:41 ` Alexander Aring [this message]
2023-03-17 20:41 ` [Cluster-devel] [PATCH 3/3] dlm_controld: remove unnecessary list_empty check Alexander Aring

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=20230317204102.1776638-3-aahringo@redhat.com \
    --to=aahringo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).