diff mbox series

[FFmpeg-devel,2.1/3] libavformat/protocols.c: avio_enum_protocols(): Split declaration and initialization

Message ID 81fc8bc6d09748c690e378a877b2a90d@gmail.com
State New
Headers show
Series [FFmpeg-devel,2.1/3] libavformat/protocols.c: avio_enum_protocols(): Split declaration and initialization | expand

Checks

Context Check Description
andriy/configure warning Failed to apply patch

Commit Message

Michael Witten Aug. 11, 2021, 7 p.m. UTC
The main purpose of doing this is to allow for inserting a
a statement label; as I recall, a label cannot be placed
just before a declaration, even when that declaration has
an initializer (then again, I never tried, so maybe this
is not true...)

---
 libavformat/protocols.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavformat/protocols.c b/libavformat/protocols.c
index e671c5ab6a..1c5e3b2bdb 100644
--- a/libavformat/protocols.c
+++ b/libavformat/protocols.c
@@ -93,8 +93,9 @@  const AVClass *ff_urlcontext_child_class_iterate(void **iter)
 
 const char *avio_enum_protocols(void **const opaque, const int output)
 {
-    const URLProtocol *const *p = *opaque;
+    const URLProtocol *const *p;
 
+    p = *opaque;
     p = p ? p + 1 : url_protocols;
     *opaque = (void *)p;
     if (!*p) {