[FFmpeg-devel] [PATCH] avcodec: improve the function of FF_ALLOC{Z}{_ARRAY}_OR_GOTO

Nicolas George george at nsup.org
Tue May 12 20:58:29 EEST 2020


Marton Balint (12020-05-12):
> And you assume that I want to assign the error code to ret. Wrong. What if I
> want to return it as is?

Assign it to ret and forward ret.

>			   Or what if I want to return NULL beacuse the
> function returns a pointer?

Bad design, fix it.

>				Using variables is complicated. Constants make
> the code more simple and readable.

Simpler now, much more complex later to fix the incorrect error codes.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200512/566c8843/attachment.sig>


More information about the ffmpeg-devel mailing list