The loop variables can now be moved into their respective slots of the 'for(;;)' statement; this removes the need for the 'done' label.
--- libavformat/protocols.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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; } -- 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".