This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] Cygwin: improve a comment in fhandler_socket::getsockname


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=09d32b7480aaa27b92e69fb74c4baecdb54369d0

commit 09d32b7480aaa27b92e69fb74c4baecdb54369d0
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed Feb 14 10:31:02 2018 +0100

    Cygwin: improve a comment in fhandler_socket::getsockname
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/fhandler_socket.cc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc
index 92b4db9..fa2bdf3 100644
--- a/winsup/cygwin/fhandler_socket.cc
+++ b/winsup/cygwin/fhandler_socket.cc
@@ -1411,9 +1411,8 @@ fhandler_socket::getsockname (struct sockaddr *name, int *namelen)
     }
   else
     {
-      /* Always use a local big enough buffer and truncate later as necessary
-	 per POSIX.  WinSock unfortunaltey only returns WSAEFAULT if the buffer
-	 is too small. */
+      /* WinSock just returns WSAEFAULT if the buffer is too small.  Use a
+         big enough local buffer and truncate later as necessary, per POSIX. */
       struct sockaddr_storage sock;
       int len = sizeof sock;
       res = ::getsockname (get_socket (), (struct sockaddr *) &sock, &len);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]