Date: Fri, 11 Mar 2022 12:09:47 +0100 From: Hans Petter Selasky <hps@selasky.org> To: Mateusz Piotrowski <0mp@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 419822b372f5 - main - libgeom(3): Use calloc instead of malloc and bzero. Message-ID: <a55f8a81-7897-6f6d-68fe-de41a733dce2@selasky.org> In-Reply-To: <4eaba9f4-7cd6-5af3-d745-97932501a2fc@FreeBSD.org> References: <202203110942.22B9guNt032463@gitrepo.freebsd.org> <4eaba9f4-7cd6-5af3-d745-97932501a2fc@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 3/11/22 11:57, Mateusz Piotrowski wrote: > Hi, > > I grepped out tree and there are many other places, which could be > converted to using calloc. Is there anything to watch out for when > converting malloc and memset call pairs to calloc? > Hi, If you have a tool for it combined with a review, should be pretty straight forward. I don't see any issues converting malloc, memset/bzero sequences, as long as they zero the full memory area allocated. Maybe in contributed code, you need to push changes upstream first. --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a55f8a81-7897-6f6d-68fe-de41a733dce2>