Re: git: 419822b372f5 - main - libgeom(3): Use calloc instead of malloc and bzero.
- Reply: Warner Losh : "Re: git: 419822b372f5 - main - libgeom(3): Use calloc instead of malloc and bzero."
- Reply: Ed Maste : "Re: git: 419822b372f5 - main - libgeom(3): Use calloc instead of malloc and bzero."
- In reply to: Mateusz Piotrowski : "Re: git: 419822b372f5 - main - libgeom(3): Use calloc instead of malloc and bzero."
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 11 Mar 2022 11:09:47 UTC
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