> -----Original Message----- > From: ffmpeg-devel <ffmpeg-devel-boun...@ffmpeg.org> On Behalf Of > myp...@gmail.com > Sent: 2020年6月16日 14:18 > To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH 2/2] dnn_backend_native: check operand > index > > On Wed, Jun 10, 2020 at 10:04 PM Guo Yejun <yejun....@intel.com> wrote: > > > > it fixed the issue in https://trac.ffmpeg.org/ticket/8716 > > > > Signed-off-by: Guo Yejun <yejun....@intel.com> > > > > + if (operand_index >= network->operands_num) { > > + goto fail; > > + } > > + > I prefer > if (expr) > statements(); > without the braces if only a single statement.
thanks for the review. I personally like to always add '{}' to avoid possible mistakes when we change code in the future. Some coding styles also recommend this method. I checked at http://ffmpeg.org/developer.html#Coding-Rules and do not find an explicit description. But I just remembered that someone also mentioned this some time ago. I'll change to this style in v2 if no support from others for my style. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".