Le duodi 12 thermidor, an CCXXV, Paras Chadha a écrit :
> But i am returning the size from this function. If i make them unsigned,
> how will i return errors which are negative integers.
> One thing i can do is pass data_size as pointer to the function. Should i
> do that ?

No need: you can make the variables unsigned and still return them as
signed. The error codes never go into the variables.

> > Use the correct bound, long is wrong.
> okay, i was actually confused regarding the correct bound. So should i use
> INT_MAX as it is the default value max_alloc_size. Since i am adding 2879
> at the end, so correct limiting value would be INT_MAX - 2879. Am i correct
> or should i use something else ?

You have to use the constant that corresponds to the types in the
computation. If it is int, then INT_MAX, int64_t wants INT64_MAX and
size_t wants SIZE_MAX.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature

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

Reply via email to