[FFmpeg-devel] [PATCH] qt-faststart: Remove unnecessary checks before calling free

Måns Rullgård mans
Sat May 1 17:41:08 CEST 2010


Uoti Urpala <uoti.urpala at pp1.inet.fi> writes:

> On Sat, 2010-05-01 at 12:34 +0100, M?ns Rullg?rd wrote:
>> Alexander Strange <astrange at ithinksw.com> writes:
>> 
>> > On May 1, 2010, at 7:07 AM, M?ns Rullg?rd wrote:
>> >
>> >> Martin Storsj? <martin at martin.st> writes:
>> >> 
>> >>> On Fri, 30 Apr 2010, Frank Barchard wrote:
>> >>> 
>> >>>> On Fri, Apr 30, 2010 at 11:16 AM, Baptiste Coudurier <
>> >>>> baptiste.coudurier at gmail.com> wrote:
>> >>>>> Well I'd be ok, but I thought there were some systems that would
>> >>>>> not handle free(NULL) out there.
>> >>>> 
>> >>>> 
>> >>>> Agreed.
>> >>> 
>> >>> Hmm, ok. Out of curiosity, what systems do we support where free(NULL) 
>> >>> isn't ok?
>> >> 
>> >> None.  I have never seen such a system.  They are a myth perpetrated
>> >> by people who like justifying extraneous if statements.
>> >
>> > C99 requires free(NULL) to work.
>> 
>> Knowing that, I assumed we were talking about not-quite-C99 systems,
>> of which there are many, yet even amongst these I have not seen one
>> where free(NULL) does not work.
>
> That was already required in C89.

I have seen systems failing to meet even that.  Don't ask.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list