[FFmpeg-cvslog] r14362 - trunk/libavcodec/ra288.c

Uoti Urpala uoti.urpala
Thu Jul 24 20:03:23 CEST 2008


On Thu, 2008-07-24 at 19:26 +0200, Reimar D?ffinger wrote:
> > > On Thu, Jul 24, 2008 at 06:07:50AM +0200, vitor wrote:
> > > > Follow FFmpeg convention of returning negative values on error in eval_lpc_coeffs()
> > > 
> > > Not that I want to complain, but I do not consider it a convention for
> > > internal functions that do not need to return any error codes.

> Well, a strict convention would have to handle the corner-cases well,
> too. E.g. a is_.. function. And what about a is_bad_... function?
> Either way, except that I dislike leaving away the < 0 I guess I am
> happy as long as at least AVERROR(...) is consistently used where
> appropriate ;-)

I think the Linux convention makes sense:

        If the name of a function is an action or an imperative command,
        the function should return an error-code integer.  If the name
        is a predicate, the function should return a "succeeded" boolean.

"eval_lpc_coeffs" is a "do_something" command so it should return
negative values in case it fails. "is_xxx" is clearly a predicate so it
should return a boolean.





More information about the ffmpeg-cvslog mailing list