Re: [PATCH maint] builtin-merge.c: fix memory under-allocation
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 9, 2008, 11:12 UTC
- Message-ID
- <7vmyheowcr.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <0LPLRUZaEHuEZTri_v38ySJHqYAhrfOpOkyUviUH9eOrx8IXBEAzYA@cipher.nrlssc.navy.mil>
Brandon Casey <casey@nrlssc.navy.mil> writes:
Show 12 quoted lines
> Miklos Vajna wrote: >> On Wed, Oct 08, 2008 at 07:07:54PM -0500, Brandon Casey <casey@nrlssc.navy.mil> wrote: >>> While we're at it, change the allocation to reference the variable it is >>> allocating memory for to try to prevent a similar mistake if the type is >>> changed in the future. >> >> If this is really a problem, then I think it would be good to mention >> this in Documentation/CodingGuidelines. > > That's fine. Though I didn't mean to imply that the memory under-allocation > was caused by a change in variable type in this case. Re-reading my commit > message, maybe it sounds like that.
Yeah, it does. I was scratching my head and had to read the patch three times until I got it (yes, I am especially slower than usual today, as the reason I am reading mails right now is because I am jetlagged and cannot sleep).