On 24/01/16 00:21, Timothy Gu wrote:
> On Sat, Jan 23, 2016 at 07:17:00PM +0000, Mark Thompson wrote:
>> +    err = ...(...);
>> +    if(err) {
> 
> err < 0?
> 

Is there a policy on this?

For functions with only zero success or error code, I would prefer to check for 
nonzero as error.  It will catch any strange cases, including raising an error 
if the underlying API changes to have more different success cases that you 
need to modify the code to handle.

- Mark

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to