]> granicus.if.org Git - postgresql/commitdiff
Fix prototype of pgwin32_bind().
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 14 Apr 2016 13:44:21 +0000 (09:44 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 14 Apr 2016 13:44:21 +0000 (09:44 -0400)
I (tgl) had copied-and-pasted this from pgwin32_accept(), failing to
notice that the third parameter should be "int" not "int *".

David Rowley

src/backend/port/win32/socket.c
src/include/port/win32.h

index ea4fb557b6ec8cafd368cc9032293380d8c106d3..56a13e5894be18fadd491bb2d8260267338496b6 100644 (file)
@@ -265,7 +265,7 @@ pgwin32_socket(int af, int type, int protocol)
 }
 
 int
-pgwin32_bind(SOCKET s, struct sockaddr * addr, int *addrlen)
+pgwin32_bind(SOCKET s, struct sockaddr * addr, int addrlen)
 {
        int                     res;
 
index 9810a835401e10d4a8a34d3b87a39da832b0ee86..708d47ab3e573c1229ddd5dce9ab52130a666a3c 100644 (file)
@@ -373,7 +373,7 @@ void                pg_queue_signal(int signum);
 #define send(s, buf, len, flags) pgwin32_send(s, buf, len, flags)
 
 SOCKET         pgwin32_socket(int af, int type, int protocol);
-int                    pgwin32_bind(SOCKET s, struct sockaddr * addr, int *addrlen);
+int                    pgwin32_bind(SOCKET s, struct sockaddr * addr, int addrlen);
 int                    pgwin32_listen(SOCKET s, int backlog);
 SOCKET         pgwin32_accept(SOCKET s, struct sockaddr * addr, int *addrlen);
 int                    pgwin32_connect(SOCKET s, const struct sockaddr * name, int namelen);