Re: git: 419822b372f5 - main - libgeom(3): Use calloc instead of malloc and bzero.
Date: Fri, 11 Mar 2022 14:15:42 UTC
On Fri, Mar 11, 2022, 4:10 AM Hans Petter Selasky <hps@selasky.org> wrote: > 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. > You likely can use coccinelle to find these. It works better than grep. I don't see any issues converting malloc, memset/bzero sequences, as > long as they zero the full memory area allocated. > I'd break the commits up one per directory in case one needs to be reverted... Maybe in contributed code, you need to push changes upstream first. > Definitely. Warner > --HPS > >