Message ID | 3c6dd20cea674a09b98ec09c0f81b96a@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,2.c/3] libavformat/protocols.c: avio_enum_protocols(): Move the loop variables | expand |
Context | Check | Description |
---|---|---|
andriy/configure | warning | Failed to apply patch |
diff --git a/libavformat/protocols.c b/libavformat/protocols.c index 2aa302d08f..e3cde9ce02 100644 --- a/libavformat/protocols.c +++ b/libavformat/protocols.c @@ -95,19 +95,13 @@ const char *avio_enum_protocols(void **const opaque, const int output) { typedef const URLProtocol *const *Iterator; Iterator p = *opaque ? (Iterator)(*opaque) + 1 : url_protocols; - for(;;) { - if (*p) { + for(; *p; ++p) { if ((output && (*p)->url_write) || (!output && (*p)->url_read)) { *opaque = (void *)p; return (*p)->name; } - } else { - goto done; - } - ++p; } -done: *opaque = NULL; return NULL; }