public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: sandeen@sandeen.net, darrick.wong@oracle.com, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/3] misc: fix valgrind complaints
Date: Mon, 11 Jan 2021 17:27:46 +0000	[thread overview]
Message-ID: <20210111172746.GA848188@infradead.org> (raw)
In-Reply-To: <161017372088.1142776.17470250928392025583.stgit@magnolia>

On Fri, Jan 08, 2021 at 10:28:40PM -0800, Darrick J. Wong wrote:
>  	char		hbuf [MAXHANSIZ];
>  	int		ret;
> -	uint32_t	handlen;
> +	uint32_t	handlen = 0;
>  	xfs_fsop_handlereq_t hreq;
>  
> +	memset(&hreq, 0, sizeof(hreq));
> +	memset(hbuf, 0, MAXHANSIZ);

Using empty initializers at declaration time is simpler and sometimes
more efficient.  But either way will work fine.


  parent reply	other threads:[~2021-01-11 17:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-09  6:28 [PATCHSET 0/3] various: random fixes Darrick J. Wong
2021-01-09  6:28 ` [PATCH 1/3] misc: fix valgrind complaints Darrick J. Wong
2021-01-11 13:38   ` Chandan Babu R
2021-01-12  1:22     ` Darrick J. Wong
2021-01-11 17:27   ` Christoph Hellwig [this message]
2021-01-12  1:22     ` Darrick J. Wong
2021-01-09  6:28 ` [PATCH 2/3] xfs_scrub: load and unload libicu properly Darrick J. Wong
2021-01-11 14:15   ` Chandan Babu R
2021-01-12  1:21     ` Darrick J. Wong
2021-01-09  6:28 ` [PATCH 3/3] xfs_scrub: handle concurrent directory updates during name scan Darrick J. Wong
2021-01-12 11:15   ` Chandan Babu R
2021-01-12 17:13     ` Darrick J. Wong

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=20210111172746.GA848188@infradead.org \
    --to=hch@infradead.org \
    --cc=darrick.wong@oracle.com \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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