Re: [PATCH 1/3] misc: fix valgrind complaints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 11, 2021 at 05:27:46PM +0000, Christoph Hellwig wrote:
> 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.

I'll fix that then, and get rid of two more typedef usages.

--D



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux