diff mbox series

[FFmpeg-devel,2.a/3] libavformat/protocols.c: avio_enum_protocols(): Move branch to bottom of function

Message ID 2ee0958751c14816acbb5a9eca699c0b@gmail.com
State New
Headers show
Series [FFmpeg-devel,2.a/3] libavformat/protocols.c: avio_enum_protocols(): Move branch to bottom of function | expand

Checks

Context Check Description
andriy/configure warning Failed to apply patch

Commit Message

Michael Witten Aug. 11, 2021, 7:01 p.m. UTC
A 'goto done;' statement is used to jump to the desired code.
---
 libavformat/protocols.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/protocols.c b/libavformat/protocols.c
index 0deadbfbe7..032f07bf72 100644
--- a/libavformat/protocols.c
+++ b/libavformat/protocols.c
@@ -102,11 +102,14 @@  iterate:
             return (*p)->name;
         }
     } else {
-        *opaque = NULL;
-        return NULL;
+        goto done;
     }
     ++p;
     goto iterate;
+
+done:
+    *opaque = NULL;
+    return NULL;
 }
 
 const AVClass *avio_protocol_get_class(const char *name)