diff mbox series

[FFmpeg-devel,07/10] avutil/opt: Simplify av_opt_set_dict2()

Message ID AM7PR03MB6660F1D50D678DAF99A1D0448FD99@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 3df34e7bf7bd75d9fa2ca83f7d5baec45cc95a1c
Headers show
Series [FFmpeg-devel,01/10] avcodec/mpegvideo: Move startcodes to mpeg12.h
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 13, 2021, 1:53 p.m. UTC
Make it clearer that the ordinary exit always returns 0.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavutil/opt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavutil/opt.c b/libavutil/opt.c
index 24b8899ca0..f05283d610 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -1635,7 +1635,7 @@  int av_opt_set_dict2(void *obj, AVDictionary **options, int search_flags)
 {
     AVDictionaryEntry *t = NULL;
     AVDictionary    *tmp = NULL;
-    int ret = 0;
+    int ret;
 
     if (!options)
         return 0;
@@ -1649,11 +1649,10 @@  int av_opt_set_dict2(void *obj, AVDictionary **options, int search_flags)
             av_dict_free(&tmp);
             return ret;
         }
-        ret = 0;
     }
     av_dict_free(options);
     *options = tmp;
-    return ret;
+    return 0;
 }
 
 int av_opt_set_dict(void *obj, AVDictionary **options)