From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id A154A4A750 for ; Sun, 5 May 2024 19:59:40 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3F11768D598; Sun, 5 May 2024 22:59:37 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 58AF068D562 for ; Sun, 5 May 2024 22:59:31 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 25233EA59A for ; Sun, 5 May 2024 21:59:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VoW1Zr81h-W5 for ; Sun, 5 May 2024 21:59:29 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id F1EA7EA599 for ; Sun, 5 May 2024 21:59:28 +0200 (CEST) Date: Sun, 5 May 2024 21:59:28 +0200 (CEST) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <20240419190801.169291-1-ffmpeg-devel@pileofstuff.org> Message-ID: <458a73af-a0a3-a2f2-d881-e747fa2ea29a@passwd.hu> References: <819f684d-8a72-465d-ab22-3eef5bc3468b@gmail.com> <20240419190801.169291-1-ffmpeg-devel@pileofstuff.org> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH v3 1/3] avformat/network: add ff_neterrno2() for cases where we already have an errno X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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-request@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-request@ffmpeg.org with subject "unsubscribe".