Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
45481db0
Commit
45481db0
authored
Feb 04, 2008
by
Andrew Talbot
Committed by
Alexandre Julliard
Feb 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Remove unneeded casts.
parent
6436dd61
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
18 deletions
+18
-18
ftp.c
dlls/wininet/ftp.c
+3
-3
http.c
dlls/wininet/http.c
+1
-1
internet.c
dlls/wininet/internet.c
+9
-9
urlcache.c
dlls/wininet/urlcache.c
+4
-4
utility.c
dlls/wininet/utility.c
+1
-1
No files found.
dlls/wininet/ftp.c
View file @
45481db0
...
@@ -474,7 +474,7 @@ lend:
...
@@ -474,7 +474,7 @@ lend:
{
{
INTERNET_ASYNC_RESULT
iar
;
INTERNET_ASYNC_RESULT
iar
;
iar
.
dwResult
=
(
DWORD
)
bSuccess
;
iar
.
dwResult
=
bSuccess
;
iar
.
dwError
=
bSuccess
?
ERROR_SUCCESS
:
ERROR_INTERNET_EXTENDED_ERROR
;
iar
.
dwError
=
bSuccess
?
ERROR_SUCCESS
:
ERROR_INTERNET_EXTENDED_ERROR
;
SendAsyncCallback
(
&
lpwfs
->
hdr
,
lpwfs
->
hdr
.
dwContext
,
INTERNET_STATUS_REQUEST_COMPLETE
,
SendAsyncCallback
(
&
lpwfs
->
hdr
,
lpwfs
->
hdr
.
dwContext
,
INTERNET_STATUS_REQUEST_COMPLETE
,
&
iar
,
sizeof
(
INTERNET_ASYNC_RESULT
));
&
iar
,
sizeof
(
INTERNET_ASYNC_RESULT
));
...
@@ -1008,13 +1008,13 @@ lend:
...
@@ -1008,13 +1008,13 @@ lend:
{
{
INTERNET_ASYNC_RESULT
iar
;
INTERNET_ASYNC_RESULT
iar
;
iar
.
dwResult
=
(
DWORD
)
bSuccess
;
iar
.
dwResult
=
bSuccess
;
iar
.
dwError
=
bSuccess
?
ERROR_SUCCESS
:
ERROR_INTERNET_EXTENDED_ERROR
;
iar
.
dwError
=
bSuccess
?
ERROR_SUCCESS
:
ERROR_INTERNET_EXTENDED_ERROR
;
SendAsyncCallback
(
&
lpwfs
->
hdr
,
lpwfs
->
hdr
.
dwContext
,
INTERNET_STATUS_REQUEST_COMPLETE
,
SendAsyncCallback
(
&
lpwfs
->
hdr
,
lpwfs
->
hdr
.
dwContext
,
INTERNET_STATUS_REQUEST_COMPLETE
,
&
iar
,
sizeof
(
INTERNET_ASYNC_RESULT
));
&
iar
,
sizeof
(
INTERNET_ASYNC_RESULT
));
}
}
return
(
DWORD
)
bSuccess
;
return
bSuccess
;
}
}
/***********************************************************************
/***********************************************************************
...
...
dlls/wininet/http.c
View file @
45481db0
...
@@ -796,7 +796,7 @@ BOOL WINAPI HttpEndRequestA(HINTERNET hRequest,
...
@@ -796,7 +796,7 @@ BOOL WINAPI HttpEndRequestA(HINTERNET hRequest,
FIXME
(
"Do we need to translate info out of these buffer?
\n
"
);
FIXME
(
"Do we need to translate info out of these buffer?
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
(
LPVOID
)
ptrW
->
lpvBuffer
);
HeapFree
(
GetProcessHeap
(),
0
,
ptrW
->
lpvBuffer
);
ptrW2
=
ptrW
->
Next
;
ptrW2
=
ptrW
->
Next
;
HeapFree
(
GetProcessHeap
(),
0
,
ptrW
);
HeapFree
(
GetProcessHeap
(),
0
,
ptrW
);
ptrW
=
ptrW2
;
ptrW
=
ptrW2
;
...
...
dlls/wininet/internet.c
View file @
45481db0
...
@@ -265,7 +265,7 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
...
@@ -265,7 +265,7 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
URLCacheContainers_CreateDefaults
();
URLCacheContainers_CreateDefaults
();
WININET_hModule
=
(
HMODULE
)
hinstDLL
;
WININET_hModule
=
hinstDLL
;
case
DLL_THREAD_ATTACH
:
case
DLL_THREAD_ATTACH
:
break
;
break
;
...
@@ -568,7 +568,7 @@ lend:
...
@@ -568,7 +568,7 @@ lend:
HINTERNET
WINAPI
InternetOpenA
(
LPCSTR
lpszAgent
,
DWORD
dwAccessType
,
HINTERNET
WINAPI
InternetOpenA
(
LPCSTR
lpszAgent
,
DWORD
dwAccessType
,
LPCSTR
lpszProxy
,
LPCSTR
lpszProxyBypass
,
DWORD
dwFlags
)
LPCSTR
lpszProxy
,
LPCSTR
lpszProxyBypass
,
DWORD
dwFlags
)
{
{
HINTERNET
rc
=
(
HINTERNET
)
NULL
;
HINTERNET
rc
=
NULL
;
INT
len
;
INT
len
;
WCHAR
*
szAgent
=
NULL
,
*
szProxy
=
NULL
,
*
szBypass
=
NULL
;
WCHAR
*
szAgent
=
NULL
,
*
szProxy
=
NULL
,
*
szBypass
=
NULL
;
...
@@ -851,7 +851,7 @@ HINTERNET WINAPI InternetConnectA(HINTERNET hInternet,
...
@@ -851,7 +851,7 @@ HINTERNET WINAPI InternetConnectA(HINTERNET hInternet,
LPCSTR
lpszUserName
,
LPCSTR
lpszPassword
,
LPCSTR
lpszUserName
,
LPCSTR
lpszPassword
,
DWORD
dwService
,
DWORD
dwFlags
,
DWORD_PTR
dwContext
)
DWORD
dwService
,
DWORD
dwFlags
,
DWORD_PTR
dwContext
)
{
{
HINTERNET
rc
=
(
HINTERNET
)
NULL
;
HINTERNET
rc
=
NULL
;
INT
len
=
0
;
INT
len
=
0
;
LPWSTR
szServerName
=
NULL
;
LPWSTR
szServerName
=
NULL
;
LPWSTR
szUserName
=
NULL
;
LPWSTR
szUserName
=
NULL
;
...
@@ -1700,7 +1700,7 @@ BOOL WINAPI InternetWriteFile(HINTERNET hFile, LPCVOID lpBuffer ,
...
@@ -1700,7 +1700,7 @@ BOOL WINAPI InternetWriteFile(HINTERNET hFile, LPCVOID lpBuffer ,
LPWININETHANDLEHEADER
lpwh
;
LPWININETHANDLEHEADER
lpwh
;
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
lpwh
=
(
LPWININETHANDLEHEADER
)
WININET_GetObject
(
hFile
);
lpwh
=
WININET_GetObject
(
hFile
);
if
(
NULL
==
lpwh
)
if
(
NULL
==
lpwh
)
return
FALSE
;
return
FALSE
;
...
@@ -2544,7 +2544,7 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption,
...
@@ -2544,7 +2544,7 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption,
LPWININETHANDLEHEADER
lpwh
;
LPWININETHANDLEHEADER
lpwh
;
INTERNET_STATUS_CALLBACK
callback
=
*
(
INTERNET_STATUS_CALLBACK
*
)
lpBuffer
;
INTERNET_STATUS_CALLBACK
callback
=
*
(
INTERNET_STATUS_CALLBACK
*
)
lpBuffer
;
if
(
!
(
lpwh
=
(
LPWININETHANDLEHEADER
)
WININET_GetObject
(
hInternet
)))
return
FALSE
;
if
(
!
(
lpwh
=
WININET_GetObject
(
hInternet
)))
return
FALSE
;
r
=
(
set_status_callback
(
lpwh
,
callback
,
FALSE
)
!=
INTERNET_INVALID_STATUS_CALLBACK
);
r
=
(
set_status_callback
(
lpwh
,
callback
,
FALSE
)
!=
INTERNET_INVALID_STATUS_CALLBACK
);
WININET_Release
(
lpwh
);
WININET_Release
(
lpwh
);
return
r
;
return
r
;
...
@@ -3104,7 +3104,7 @@ HINTERNET WINAPI InternetOpenUrlW(HINTERNET hInternet, LPCWSTR lpszUrl,
...
@@ -3104,7 +3104,7 @@ HINTERNET WINAPI InternetOpenUrlW(HINTERNET hInternet, LPCWSTR lpszUrl,
HINTERNET
WINAPI
InternetOpenUrlA
(
HINTERNET
hInternet
,
LPCSTR
lpszUrl
,
HINTERNET
WINAPI
InternetOpenUrlA
(
HINTERNET
hInternet
,
LPCSTR
lpszUrl
,
LPCSTR
lpszHeaders
,
DWORD
dwHeadersLength
,
DWORD
dwFlags
,
DWORD_PTR
dwContext
)
LPCSTR
lpszHeaders
,
DWORD
dwHeadersLength
,
DWORD
dwFlags
,
DWORD_PTR
dwContext
)
{
{
HINTERNET
rc
=
(
HINTERNET
)
NULL
;
HINTERNET
rc
=
NULL
;
INT
lenUrl
;
INT
lenUrl
;
INT
lenHeaders
=
0
;
INT
lenHeaders
=
0
;
...
@@ -3117,16 +3117,16 @@ HINTERNET WINAPI InternetOpenUrlA(HINTERNET hInternet, LPCSTR lpszUrl,
...
@@ -3117,16 +3117,16 @@ HINTERNET WINAPI InternetOpenUrlA(HINTERNET hInternet, LPCSTR lpszUrl,
lenUrl
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszUrl
,
-
1
,
NULL
,
0
);
lenUrl
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszUrl
,
-
1
,
NULL
,
0
);
szUrl
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lenUrl
*
sizeof
(
WCHAR
));
szUrl
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lenUrl
*
sizeof
(
WCHAR
));
if
(
!
szUrl
)
if
(
!
szUrl
)
return
(
HINTERNET
)
NULL
;
return
NULL
;
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszUrl
,
-
1
,
szUrl
,
lenUrl
);
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszUrl
,
-
1
,
szUrl
,
lenUrl
);
}
}
if
(
lpszHeaders
)
{
if
(
lpszHeaders
)
{
lenHeaders
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszHeaders
,
dwHeadersLength
,
NULL
,
0
);
lenHeaders
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszHeaders
,
dwHeadersLength
,
NULL
,
0
);
szHeaders
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lenHeaders
*
sizeof
(
WCHAR
));
szHeaders
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lenHeaders
*
sizeof
(
WCHAR
));
if
(
!
szHeaders
)
{
if
(
!
szHeaders
)
{
HeapFree
(
GetProcessHeap
(),
0
,
szUrl
);
HeapFree
(
GetProcessHeap
(),
0
,
szUrl
);
return
(
HINTERNET
)
NULL
;
return
NULL
;
}
}
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszHeaders
,
dwHeadersLength
,
szHeaders
,
lenHeaders
);
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszHeaders
,
dwHeadersLength
,
szHeaders
,
lenHeaders
);
}
}
...
...
dlls/wininet/urlcache.c
View file @
45481db0
...
@@ -1125,7 +1125,7 @@ static BOOL URLCache_FindHash(LPCURLCACHE_HEADER pHeader, LPCSTR lpszUrl, struct
...
@@ -1125,7 +1125,7 @@ static BOOL URLCache_FindHash(LPCURLCACHE_HEADER pHeader, LPCSTR lpszUrl, struct
HASH_CACHEFILE_ENTRY
*
pHashEntry
;
HASH_CACHEFILE_ENTRY
*
pHashEntry
;
DWORD
dwHashTableNumber
=
0
;
DWORD
dwHashTableNumber
=
0
;
key
=
(
DWORD
)(
key
/
HASHTABLE_NUM_ENTRIES
)
*
HASHTABLE_NUM_ENTRIES
;
key
=
(
key
/
HASHTABLE_NUM_ENTRIES
)
*
HASHTABLE_NUM_ENTRIES
;
for
(
pHashEntry
=
URLCache_HashEntryFromOffset
(
pHeader
,
pHeader
->
dwOffsetFirstHashTable
);
for
(
pHashEntry
=
URLCache_HashEntryFromOffset
(
pHeader
,
pHeader
->
dwOffsetFirstHashTable
);
((
DWORD
)((
LPBYTE
)
pHashEntry
-
(
LPBYTE
)
pHeader
)
>=
ENTRY_START_OFFSET
)
&&
((
DWORD
)((
LPBYTE
)
pHashEntry
-
(
LPBYTE
)
pHeader
)
<
pHeader
->
dwFileSize
);
((
DWORD
)((
LPBYTE
)
pHashEntry
-
(
LPBYTE
)
pHeader
)
>=
ENTRY_START_OFFSET
)
&&
((
DWORD
)((
LPBYTE
)
pHashEntry
-
(
LPBYTE
)
pHeader
)
<
pHeader
->
dwFileSize
);
...
@@ -1147,7 +1147,7 @@ static BOOL URLCache_FindHash(LPCURLCACHE_HEADER pHeader, LPCSTR lpszUrl, struct
...
@@ -1147,7 +1147,7 @@ static BOOL URLCache_FindHash(LPCURLCACHE_HEADER pHeader, LPCSTR lpszUrl, struct
for
(
i
=
0
;
i
<
HASHTABLE_BLOCKSIZE
;
i
++
)
for
(
i
=
0
;
i
<
HASHTABLE_BLOCKSIZE
;
i
++
)
{
{
struct
_HASH_ENTRY
*
pHashElement
=
&
pHashEntry
->
HashTable
[
offset
+
i
];
struct
_HASH_ENTRY
*
pHashElement
=
&
pHashEntry
->
HashTable
[
offset
+
i
];
if
(
key
==
(
DWORD
)(
pHashElement
->
dwHashKey
/
HASHTABLE_NUM_ENTRIES
)
*
HASHTABLE_NUM_ENTRIES
)
if
(
key
==
(
pHashElement
->
dwHashKey
/
HASHTABLE_NUM_ENTRIES
)
*
HASHTABLE_NUM_ENTRIES
)
{
{
/* FIXME: we should make sure that this is the right element
/* FIXME: we should make sure that this is the right element
* before returning and claiming that it is. We can do this
* before returning and claiming that it is. We can do this
...
@@ -1195,7 +1195,7 @@ static BOOL URLCache_FindHashW(LPCURLCACHE_HEADER pHeader, LPCWSTR lpszUrl, stru
...
@@ -1195,7 +1195,7 @@ static BOOL URLCache_FindHashW(LPCURLCACHE_HEADER pHeader, LPCWSTR lpszUrl, stru
*/
*/
static
BOOL
URLCache_HashEntrySetUse
(
struct
_HASH_ENTRY
*
pHashEntry
,
DWORD
dwUseCount
)
static
BOOL
URLCache_HashEntrySetUse
(
struct
_HASH_ENTRY
*
pHashEntry
,
DWORD
dwUseCount
)
{
{
pHashEntry
->
dwHashKey
=
dwUseCount
|
(
DWORD
)(
pHashEntry
->
dwHashKey
/
HASHTABLE_NUM_ENTRIES
)
*
HASHTABLE_NUM_ENTRIES
;
pHashEntry
->
dwHashKey
=
dwUseCount
|
(
pHashEntry
->
dwHashKey
/
HASHTABLE_NUM_ENTRIES
)
*
HASHTABLE_NUM_ENTRIES
;
return
TRUE
;
return
TRUE
;
}
}
...
@@ -1238,7 +1238,7 @@ static BOOL URLCache_AddEntryToHash(LPURLCACHE_HEADER pHeader, LPCSTR lpszUrl, D
...
@@ -1238,7 +1238,7 @@ static BOOL URLCache_AddEntryToHash(LPURLCACHE_HEADER pHeader, LPCSTR lpszUrl, D
HASH_CACHEFILE_ENTRY
*
pHashEntry
;
HASH_CACHEFILE_ENTRY
*
pHashEntry
;
DWORD
dwHashTableNumber
=
0
;
DWORD
dwHashTableNumber
=
0
;
key
=
(
DWORD
)(
key
/
HASHTABLE_NUM_ENTRIES
)
*
HASHTABLE_NUM_ENTRIES
;
key
=
(
key
/
HASHTABLE_NUM_ENTRIES
)
*
HASHTABLE_NUM_ENTRIES
;
for
(
pHashEntry
=
URLCache_HashEntryFromOffset
(
pHeader
,
pHeader
->
dwOffsetFirstHashTable
);
for
(
pHashEntry
=
URLCache_HashEntryFromOffset
(
pHeader
,
pHeader
->
dwOffsetFirstHashTable
);
((
DWORD
)((
LPBYTE
)
pHashEntry
-
(
LPBYTE
)
pHeader
)
>=
ENTRY_START_OFFSET
)
&&
((
DWORD
)((
LPBYTE
)
pHashEntry
-
(
LPBYTE
)
pHeader
)
<
pHeader
->
dwFileSize
);
((
DWORD
)((
LPBYTE
)
pHashEntry
-
(
LPBYTE
)
pHeader
)
>=
ENTRY_START_OFFSET
)
&&
((
DWORD
)((
LPBYTE
)
pHashEntry
-
(
LPBYTE
)
pHeader
)
<
pHeader
->
dwFileSize
);
...
...
dlls/wininet/utility.c
View file @
45481db0
...
@@ -162,7 +162,7 @@ BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort,
...
@@ -162,7 +162,7 @@ BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort,
memset
(
psa
,
0
,
sizeof
(
struct
sockaddr_in
));
memset
(
psa
,
0
,
sizeof
(
struct
sockaddr_in
));
memcpy
((
char
*
)
&
psa
->
sin_addr
,
phe
->
h_addr
,
phe
->
h_length
);
memcpy
((
char
*
)
&
psa
->
sin_addr
,
phe
->
h_addr
,
phe
->
h_length
);
psa
->
sin_family
=
phe
->
h_addrtype
;
psa
->
sin_family
=
phe
->
h_addrtype
;
psa
->
sin_port
=
htons
(
(
u_short
)
nServerPort
);
psa
->
sin_port
=
htons
(
nServerPort
);
return
TRUE
;
return
TRUE
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment