From e6bd2881d8d831ac0e3b4c0ad2902ebd3096d070 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Mon, 1 Dec 2008 02:09:30 +0100 Subject: [PATCH] wininet: Remove some superfluous casts. --- dlls/wininet/ftp.c | 2 +- dlls/wininet/http.c | 4 ++-- dlls/wininet/internet.c | 10 +++++----- dlls/wininet/urlcache.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c index f351a02770e..396f1ef2c7b 100644 --- a/dlls/wininet/ftp.c +++ b/dlls/wininet/ftp.c @@ -2737,7 +2737,7 @@ static BOOL FTP_InitListenSocket(LPWININETFTPSESSIONW lpwfs) lpwfs->lstnSocketAddress = lpwfs->socketAddress; /* and get the system to assign us a port */ - lpwfs->lstnSocketAddress.sin_port = htons((u_short) 0); + lpwfs->lstnSocketAddress.sin_port = htons(0); if (bind(lpwfs->lstnSocket,(struct sockaddr *) &lpwfs->lstnSocketAddress, sizeof(struct sockaddr_in)) == -1) { diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index d43c9bb53d6..56ffe631bc1 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -773,8 +773,8 @@ BOOL WINAPI HttpEndRequestA(HINTERNET hRequest, ptr = lpBuffersOut; if (ptr) - lpBuffersOutW = (LPINTERNET_BUFFERSW)HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, sizeof(INTERNET_BUFFERSW)); + lpBuffersOutW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + sizeof(INTERNET_BUFFERSW)); else lpBuffersOutW = NULL; diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 492ce89d63d..5f6733416cc 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -786,7 +786,7 @@ HINTERNET WINAPI InternetOpenA(LPCSTR lpszAgent, DWORD dwAccessType, BOOL WINAPI InternetGetLastResponseInfoA(LPDWORD lpdwError, LPSTR lpszBuffer, LPDWORD lpdwBufferLength) { - LPWITHREADERROR lpwite = (LPWITHREADERROR)TlsGetValue(g_dwTlsErrIndex); + LPWITHREADERROR lpwite = TlsGetValue(g_dwTlsErrIndex); TRACE("\n"); @@ -823,7 +823,7 @@ BOOL WINAPI InternetGetLastResponseInfoA(LPDWORD lpdwError, BOOL WINAPI InternetGetLastResponseInfoW(LPDWORD lpdwError, LPWSTR lpszBuffer, LPDWORD lpdwBufferLength) { - LPWITHREADERROR lpwite = (LPWITHREADERROR)TlsGetValue(g_dwTlsErrIndex); + LPWITHREADERROR lpwite = TlsGetValue(g_dwTlsErrIndex); TRACE("\n"); @@ -3049,7 +3049,7 @@ static LPWITHREADERROR INTERNET_AllocThreadError(void) */ void INTERNET_SetLastError(DWORD dwError) { - LPWITHREADERROR lpwite = (LPWITHREADERROR)TlsGetValue(g_dwTlsErrIndex); + LPWITHREADERROR lpwite = TlsGetValue(g_dwTlsErrIndex); if (!lpwite) lpwite = INTERNET_AllocThreadError(); @@ -3070,7 +3070,7 @@ void INTERNET_SetLastError(DWORD dwError) */ DWORD INTERNET_GetLastError(void) { - LPWITHREADERROR lpwite = (LPWITHREADERROR)TlsGetValue(g_dwTlsErrIndex); + LPWITHREADERROR lpwite = TlsGetValue(g_dwTlsErrIndex); if (!lpwite) return 0; /* TlsGetValue clears last error, so set it again here */ SetLastError(lpwite->dwError); @@ -3143,7 +3143,7 @@ BOOL INTERNET_AsyncCall(LPWORKREQUEST lpWorkRequest) */ LPSTR INTERNET_GetResponseBuffer(void) { - LPWITHREADERROR lpwite = (LPWITHREADERROR)TlsGetValue(g_dwTlsErrIndex); + LPWITHREADERROR lpwite = TlsGetValue(g_dwTlsErrIndex); if (!lpwite) lpwite = INTERNET_AllocThreadError(); TRACE("\n"); diff --git a/dlls/wininet/urlcache.c b/dlls/wininet/urlcache.c index b353302872f..fe3bc5bafe4 100644 --- a/dlls/wininet/urlcache.c +++ b/dlls/wininet/urlcache.c @@ -2794,7 +2794,7 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamA( pStream->hFile = hFile; strcpy(pStream->lpszUrl, lpszUrlName); - return (HANDLE)pStream; + return pStream; } /***********************************************************************