The 'if(!*p)' has been turned into 'if (*p)'; of course,
this has necessitated the swapping of the branches.
---
libavformat/protocols.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
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;
--
2.22.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".