Now that the label has been moved past the initial assignment of 'p', it is possible to consolidate both the declaration and initialization.
A typedef is used to simplify the declaration of 'p', and to help the reader understand what the purpose of 'p' is. --- libavformat/protocols.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavformat/protocols.c b/libavformat/protocols.c index 7e90cb067d..5e4bf5cbae 100644 --- a/libavformat/protocols.c +++ b/libavformat/protocols.c @@ -93,10 +93,8 @@ const AVClass *ff_urlcontext_child_class_iterate(void **iter) const char *avio_enum_protocols(void **const opaque, const int output) { - const URLProtocol *const *p; - - p = *opaque; - p = p ? p + 1 : url_protocols; + typedef const URLProtocol *const *Iterator; + Iterator p = *opaque ? (Iterator)(*opaque) + 1 : url_protocols; iterate: *opaque = (void *)p; if (!*p) { -- 2.22.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".