Commit e6bd2881 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

wininet: Remove some superfluous casts.

parent 82a3c433
...@@ -2737,7 +2737,7 @@ static BOOL FTP_InitListenSocket(LPWININETFTPSESSIONW lpwfs) ...@@ -2737,7 +2737,7 @@ static BOOL FTP_InitListenSocket(LPWININETFTPSESSIONW lpwfs)
lpwfs->lstnSocketAddress = lpwfs->socketAddress; lpwfs->lstnSocketAddress = lpwfs->socketAddress;
/* and get the system to assign us a port */ /* 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) if (bind(lpwfs->lstnSocket,(struct sockaddr *) &lpwfs->lstnSocketAddress, sizeof(struct sockaddr_in)) == -1)
{ {
......
...@@ -773,8 +773,8 @@ BOOL WINAPI HttpEndRequestA(HINTERNET hRequest, ...@@ -773,8 +773,8 @@ BOOL WINAPI HttpEndRequestA(HINTERNET hRequest,
ptr = lpBuffersOut; ptr = lpBuffersOut;
if (ptr) if (ptr)
lpBuffersOutW = (LPINTERNET_BUFFERSW)HeapAlloc(GetProcessHeap(), lpBuffersOutW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
HEAP_ZERO_MEMORY, sizeof(INTERNET_BUFFERSW)); sizeof(INTERNET_BUFFERSW));
else else
lpBuffersOutW = NULL; lpBuffersOutW = NULL;
......
...@@ -786,7 +786,7 @@ HINTERNET WINAPI InternetOpenA(LPCSTR lpszAgent, DWORD dwAccessType, ...@@ -786,7 +786,7 @@ HINTERNET WINAPI InternetOpenA(LPCSTR lpszAgent, DWORD dwAccessType,
BOOL WINAPI InternetGetLastResponseInfoA(LPDWORD lpdwError, BOOL WINAPI InternetGetLastResponseInfoA(LPDWORD lpdwError,
LPSTR lpszBuffer, LPDWORD lpdwBufferLength) LPSTR lpszBuffer, LPDWORD lpdwBufferLength)
{ {
LPWITHREADERROR lpwite = (LPWITHREADERROR)TlsGetValue(g_dwTlsErrIndex); LPWITHREADERROR lpwite = TlsGetValue(g_dwTlsErrIndex);
TRACE("\n"); TRACE("\n");
...@@ -823,7 +823,7 @@ BOOL WINAPI InternetGetLastResponseInfoA(LPDWORD lpdwError, ...@@ -823,7 +823,7 @@ BOOL WINAPI InternetGetLastResponseInfoA(LPDWORD lpdwError,
BOOL WINAPI InternetGetLastResponseInfoW(LPDWORD lpdwError, BOOL WINAPI InternetGetLastResponseInfoW(LPDWORD lpdwError,
LPWSTR lpszBuffer, LPDWORD lpdwBufferLength) LPWSTR lpszBuffer, LPDWORD lpdwBufferLength)
{ {
LPWITHREADERROR lpwite = (LPWITHREADERROR)TlsGetValue(g_dwTlsErrIndex); LPWITHREADERROR lpwite = TlsGetValue(g_dwTlsErrIndex);
TRACE("\n"); TRACE("\n");
...@@ -3049,7 +3049,7 @@ static LPWITHREADERROR INTERNET_AllocThreadError(void) ...@@ -3049,7 +3049,7 @@ static LPWITHREADERROR INTERNET_AllocThreadError(void)
*/ */
void INTERNET_SetLastError(DWORD dwError) void INTERNET_SetLastError(DWORD dwError)
{ {
LPWITHREADERROR lpwite = (LPWITHREADERROR)TlsGetValue(g_dwTlsErrIndex); LPWITHREADERROR lpwite = TlsGetValue(g_dwTlsErrIndex);
if (!lpwite) if (!lpwite)
lpwite = INTERNET_AllocThreadError(); lpwite = INTERNET_AllocThreadError();
...@@ -3070,7 +3070,7 @@ void INTERNET_SetLastError(DWORD dwError) ...@@ -3070,7 +3070,7 @@ void INTERNET_SetLastError(DWORD dwError)
*/ */
DWORD INTERNET_GetLastError(void) DWORD INTERNET_GetLastError(void)
{ {
LPWITHREADERROR lpwite = (LPWITHREADERROR)TlsGetValue(g_dwTlsErrIndex); LPWITHREADERROR lpwite = TlsGetValue(g_dwTlsErrIndex);
if (!lpwite) return 0; if (!lpwite) return 0;
/* TlsGetValue clears last error, so set it again here */ /* TlsGetValue clears last error, so set it again here */
SetLastError(lpwite->dwError); SetLastError(lpwite->dwError);
...@@ -3143,7 +3143,7 @@ BOOL INTERNET_AsyncCall(LPWORKREQUEST lpWorkRequest) ...@@ -3143,7 +3143,7 @@ BOOL INTERNET_AsyncCall(LPWORKREQUEST lpWorkRequest)
*/ */
LPSTR INTERNET_GetResponseBuffer(void) LPSTR INTERNET_GetResponseBuffer(void)
{ {
LPWITHREADERROR lpwite = (LPWITHREADERROR)TlsGetValue(g_dwTlsErrIndex); LPWITHREADERROR lpwite = TlsGetValue(g_dwTlsErrIndex);
if (!lpwite) if (!lpwite)
lpwite = INTERNET_AllocThreadError(); lpwite = INTERNET_AllocThreadError();
TRACE("\n"); TRACE("\n");
......
...@@ -2794,7 +2794,7 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamA( ...@@ -2794,7 +2794,7 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamA(
pStream->hFile = hFile; pStream->hFile = hFile;
strcpy(pStream->lpszUrl, lpszUrlName); strcpy(pStream->lpszUrl, lpszUrlName);
return (HANDLE)pStream; return pStream;
} }
/*********************************************************************** /***********************************************************************
......
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