On Fri, 19 Apr 2024, Andrew Sayers wrote:

For example, WSAStartup()'s documentation says:

   "A call to the WSAGetLastError function is not needed and should not be used"
---
libavformat/network.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavformat/network.c b/libavformat/network.c
index f752efc411..fb70f9cafc 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -121,9 +121,14 @@ void ff_network_close(void)
}

#if HAVE_WINSOCK2_H
+
+}
int ff_neterrno(void)
{
-    int err = WSAGetLastError();
+    return ff_neterrno2(WSAGetLastError());
+}
+int ff_neterrno2(int err)

ff_neterror(int err) would be a better name, since it has nothing to do with errno.

Regards.
Marton

+{
    switch (err) {
    case WSAEWOULDBLOCK:
        return AVERROR(EAGAIN);
--
2.43.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".

_______________________________________________
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".

Reply via email to