Message ID | 4123b175895d4cee80b6f0df3fe91b3e@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,2.1/3] libavformat/protocols.c: avio_enum_protocols(): Split declaration and initialization | expand |
Context | Check | Description |
---|---|---|
andriy/configure | warning | Failed to apply patch |
diff --git a/libavformat/protocols.c b/libavformat/protocols.c index 5828113428..0deadbfbe7 100644 --- a/libavformat/protocols.c +++ b/libavformat/protocols.c @@ -96,14 +96,14 @@ const char *avio_enum_protocols(void **const opaque, const int output) typedef const URLProtocol *const *Iterator; Iterator p = *opaque ? (Iterator)(*opaque) + 1 : url_protocols; iterate: - if (!*p) { - *opaque = NULL; - return NULL; - } else { + if (*p) { if ((output && (*p)->url_write) || (!output && (*p)->url_read)) { *opaque = (void *)p; return (*p)->name; } + } else { + *opaque = NULL; + return NULL; } ++p; goto iterate;