From 9f82d9c779b2da0e20f3bce9280a7ca1cdcfbef8 Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Thu, 9 Jul 2009 11:04:33 -0700 Subject: [PATCH] wininet: Use sizeof(member) rather than sizeof(type) for address lengths. --- dlls/wininet/ftp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c index 75bf69ca4a7..6d41ac5f87f 100644 --- a/dlls/wininet/ftp.c +++ b/dlls/wininet/ftp.c @@ -2807,7 +2807,7 @@ lend: static BOOL FTP_InitListenSocket(LPWININETFTPSESSIONW lpwfs) { BOOL bSuccess = FALSE; - socklen_t namelen = sizeof(struct sockaddr_in); + socklen_t namelen = sizeof(lpwfs->lstnSocketAddress); TRACE("\n"); @@ -2824,7 +2824,7 @@ static BOOL FTP_InitListenSocket(LPWININETFTPSESSIONW lpwfs) /* and get the system to assign us a port */ 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"); goto lend;