Re: [PATCH] Remove useless if-before-free tests.
- From
- Morten Welinder <mwelinder@gmail.com>
- Date
- Feb 23, 2008, 13:30 UTC
- Message-ID
- <118833cc0802230530l104acc72k20ceb4b5adcff937@mail.gmail.com>
- In-Reply-To
- <87tzk0tzjz.fsf@rho.meyering.net>
Show 7 quoted lines
> +inline void gitfree(void *ptr)
> +{
> + if (ptr)
> + free(ptr);
> +}
> +#define free gitfree
> +#endifI am wondering why you do it this way. "#define free gitfree" is just not valid in a C program that includes the relevant standard header. "free" is a reserved symbol.
To stay within the standard, do the define the other way and use gitfree everywhere.
Morten