Commit 06a9da73 authored by Reimar Döffinger's avatar Reimar Döffinger

Simplify code and avoid compiler warning about incompatible types.

parent bf19c871
...@@ -60,11 +60,11 @@ URLProtocol *av_protocol_next(URLProtocol *p) ...@@ -60,11 +60,11 @@ URLProtocol *av_protocol_next(URLProtocol *p)
const char *avio_enum_protocols(void **opaque, int output) const char *avio_enum_protocols(void **opaque, int output)
{ {
URLProtocol **p = opaque; URLProtocol *p = *opaque;
*p = *p ? (*p)->next : first_protocol; p = p ? p->next : first_protocol;
if (!*p) return NULL; if (!p) return NULL;
if ((output && (*p)->url_write) || (!output && (*p)->url_read)) if ((output && p->url_write) || (!output && p->url_read))
return (*p)->name; return p->name;
return avio_enum_protocols(opaque, output); return avio_enum_protocols(opaque, output);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment