Commit 9f82d9c7 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

wininet: Use sizeof(member) rather than sizeof(type) for address lengths.

parent deabdca6
...@@ -2807,7 +2807,7 @@ lend: ...@@ -2807,7 +2807,7 @@ lend:
static BOOL FTP_InitListenSocket(LPWININETFTPSESSIONW lpwfs) static BOOL FTP_InitListenSocket(LPWININETFTPSESSIONW lpwfs)
{ {
BOOL bSuccess = FALSE; BOOL bSuccess = FALSE;
socklen_t namelen = sizeof(struct sockaddr_in); socklen_t namelen = sizeof(lpwfs->lstnSocketAddress);
TRACE("\n"); TRACE("\n");
...@@ -2824,7 +2824,7 @@ static BOOL FTP_InitListenSocket(LPWININETFTPSESSIONW lpwfs) ...@@ -2824,7 +2824,7 @@ static BOOL FTP_InitListenSocket(LPWININETFTPSESSIONW lpwfs)
/* and get the system to assign us a port */ /* and get the system to assign us a port */
lpwfs->lstnSocketAddress.sin_port = htons(0); lpwfs->lstnSocketAddress.sin_port = htons(0);
if (bind(lpwfs->lstnSocket,(struct sockaddr *) &lpwfs->lstnSocketAddress, sizeof(struct sockaddr_in)) == -1) if (bind(lpwfs->lstnSocket,(struct sockaddr *) &lpwfs->lstnSocketAddress, sizeof(lpwfs->lstnSocketAddress)) == -1)
{ {
TRACE("Unable to bind socket\n"); TRACE("Unable to bind socket\n");
goto lend; goto lend;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment