[FFmpeg-devel] [PATCH 00/13] check all fclose usage

Ronald S. Bultje rsbultje at gmail.com
Tue Jan 12 15:43:23 CET 2016


On Tue, Jan 12, 2016 at 7:52 AM, Ganesh Ajjanagadde <gajjanag at mit.edu>

> On Tue, Jan 12, 2016 at 4:38 AM, wm4 <nfxjfg at googlemail.com> wrote:
> > This makes no sense. Even if fclose() should fail for
> > whatever obscure reasons there might be, reading already worked
> > without errors, and thus closing failure has no meaning to use.
> Well, reading may not have worked, and the fclose may have been called
> in a failure path.

Then the error should be in the code path of fread(), not fclose().
Displaying an error (in whatever way) related to close while the actual
problem was reading data is going to be confusing to the user.

> Just what is the point?
> Can you please stop trolling patches with such gratuitous statements at
> the end?

... Can we not be defensive, please? ...


More information about the ffmpeg-devel mailing list