Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/2] avutil/tx: remove deadcode of the control flow
@ 2022-01-28  2:08 Steven Liu
  2022-01-28  2:08 ` [FFmpeg-devel] [PATCH 2/2] avutil/tx: add null pointer check after av_mallocz Steven Liu
       [not found] ` <20220128020818.39850-1-lq@chinaffmpeg.org-MuTRYJS--3-2>
  0 siblings, 2 replies; 4+ messages in thread
From: Steven Liu @ 2022-01-28  2:08 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Steven Liu

From: Steven Liu <liuqi05@kuaishou.com>

Fix CID: 1497864
The control flow should return ENOSYS if nb_cd_matches is 0 at before
and the ret equal AVERROR(ENOMEM) or goto end label, so remove the last
control flow if (ret >= 0) before end label.

Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
---
 libavutil/tx.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/libavutil/tx.c b/libavutil/tx.c
index 2897f3bd35..50616adba7 100644
--- a/libavutil/tx.c
+++ b/libavutil/tx.c
@@ -601,9 +601,6 @@ av_cold int ff_tx_init_subtx(AVTXContext *s, enum AVTXType type,
 
     av_free(sub);
 
-    if (ret >= 0)
-        ret = AVERROR(ENOSYS);
-
 end:
     av_free(cd_matches);
     return ret;
-- 
2.25.0

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

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-28  7:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28  2:08 [FFmpeg-devel] [PATCH 1/2] avutil/tx: remove deadcode of the control flow Steven Liu
2022-01-28  2:08 ` [FFmpeg-devel] [PATCH 2/2] avutil/tx: add null pointer check after av_mallocz Steven Liu
     [not found] ` <20220128020818.39850-1-lq@chinaffmpeg.org-MuTRYJS--3-2>
2022-01-28  7:07   ` [FFmpeg-devel] [PATCH 1/2] avutil/tx: remove deadcode of the control flow Lynne
     [not found]   ` <MuUVgkt--3-2@lynne.ee-MuUVl-q----2>
2022-01-28  7:30     ` Lynne

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git