Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
4ef6043a
Commit
4ef6043a
authored
Nov 21, 2006
by
Andrew Talbot
Committed by
Alexandre Julliard
Nov 22, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Cast-qual warnings fix.
parent
4e25188a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
35 deletions
+36
-35
internet.c
dlls/wininet/internet.c
+36
-35
No files found.
dlls/wininet/internet.c
View file @
4ef6043a
...
@@ -2060,35 +2060,32 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
...
@@ -2060,35 +2060,32 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
INTERNET_SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
INTERNET_SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
else
else
{
{
LPWSTR
proxy
=
(
LPWSTR
)((
LPBYTE
)
lpBuffer
+
sizeof
(
INTERNET_PROXY_INFOW
));
LPWSTR
proxy_bypass
=
(
LPWSTR
)((
LPBYTE
)
lpBuffer
+
sizeof
(
INTERNET_PROXY_INFOW
)
+
proxyBytesRequired
);
pPI
->
dwAccessType
=
lpwai
->
dwAccessType
;
pPI
->
dwAccessType
=
lpwai
->
dwAccessType
;
if
(
lpwai
->
lpszProxy
)
if
(
lpwai
->
lpszProxy
)
{
{
pPI
->
lpszProxy
=
(
LPWSTR
)((
LPBYTE
)
lpBuffer
+
lstrcpyW
(
proxy
,
lpwai
->
lpszProxy
);
sizeof
(
INTERNET_PROXY_INFOW
));
lstrcpyW
((
LPWSTR
)
pPI
->
lpszProxy
,
lpwai
->
lpszProxy
);
}
}
else
else
{
{
pPI
->
lpszProxy
=
(
LPWSTR
)((
LPBYTE
)
lpBuffer
+
*
proxy
=
0
;
sizeof
(
INTERNET_PROXY_INFOW
));
*
((
LPWSTR
)(
pPI
->
lpszProxy
))
=
0
;
}
}
pPI
->
lpszProxy
=
proxy
;
if
(
lpwai
->
lpszProxyBypass
)
if
(
lpwai
->
lpszProxyBypass
)
{
{
pPI
->
lpszProxyBypass
=
(
LPWSTR
)((
LPBYTE
)
lpBuffer
+
lstrcpyW
(
proxy_bypass
,
lpwai
->
lpszProxyBypass
);
sizeof
(
INTERNET_PROXY_INFOW
)
+
proxyBytesRequired
);
lstrcpyW
((
LPWSTR
)
pPI
->
lpszProxyBypass
,
lpwai
->
lpszProxyBypass
);
}
}
else
else
{
{
pPI
->
lpszProxyBypass
=
(
LPWSTR
)((
LPBYTE
)
lpBuffer
+
*
proxy_bypass
=
0
;
sizeof
(
INTERNET_PROXY_INFOW
)
+
proxyBytesRequired
);
*
((
LPWSTR
)(
pPI
->
lpszProxyBypass
))
=
0
;
}
}
pPI
->
lpszProxyBypass
=
proxy_bypass
;
bSuccess
=
TRUE
;
bSuccess
=
TRUE
;
}
}
*
lpdwBufferLength
=
sizeof
(
INTERNET_PROXY_INFOW
)
+
*
lpdwBufferLength
=
sizeof
(
INTERNET_PROXY_INFOW
)
+
...
@@ -2110,37 +2107,35 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
...
@@ -2110,37 +2107,35 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
INTERNET_SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
INTERNET_SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
else
else
{
{
LPSTR
proxy
=
(
LPSTR
)((
LPBYTE
)
lpBuffer
+
sizeof
(
INTERNET_PROXY_INFOA
));
LPSTR
proxy_bypass
=
(
LPSTR
)((
LPBYTE
)
lpBuffer
+
sizeof
(
INTERNET_PROXY_INFOA
)
+
proxyBytesRequired
);
pPI
->
dwAccessType
=
lpwai
->
dwAccessType
;
pPI
->
dwAccessType
=
lpwai
->
dwAccessType
;
if
(
lpwai
->
lpszProxy
)
if
(
lpwai
->
lpszProxy
)
{
{
pPI
->
lpszProxy
=
(
LPSTR
)((
LPBYTE
)
lpBuffer
+
sizeof
(
INTERNET_PROXY_INFOA
));
WideCharToMultiByte
(
CP_ACP
,
0
,
lpwai
->
lpszProxy
,
-
1
,
WideCharToMultiByte
(
CP_ACP
,
0
,
lpwai
->
lpszProxy
,
-
1
,
(
LPSTR
)
pPI
->
lpszP
roxy
,
proxyBytesRequired
,
NULL
,
NULL
);
p
roxy
,
proxyBytesRequired
,
NULL
,
NULL
);
}
}
else
else
{
{
pPI
->
lpszProxy
=
(
LPSTR
)((
LPBYTE
)
lpBuffer
+
*
proxy
=
'\0'
;
sizeof
(
INTERNET_PROXY_INFOA
));
*
((
LPSTR
)(
pPI
->
lpszProxy
))
=
'\0'
;
}
}
pPI
->
lpszProxy
=
proxy
;
if
(
lpwai
->
lpszProxyBypass
)
if
(
lpwai
->
lpszProxyBypass
)
{
{
pPI
->
lpszProxyBypass
=
(
LPSTR
)((
LPBYTE
)
lpBuffer
+
sizeof
(
INTERNET_PROXY_INFOA
)
+
proxyBytesRequired
);
WideCharToMultiByte
(
CP_ACP
,
0
,
lpwai
->
lpszProxyBypass
,
WideCharToMultiByte
(
CP_ACP
,
0
,
lpwai
->
lpszProxyBypass
,
-
1
,
(
LPSTR
)
pPI
->
lpszProxyBypass
,
-
1
,
proxy_bypass
,
proxyBypassBytesRequired
,
proxyBypassBytesRequired
,
NULL
,
NULL
);
NULL
,
NULL
);
}
}
else
else
{
{
pPI
->
lpszProxyBypass
=
(
LPSTR
)((
LPBYTE
)
lpBuffer
+
*
proxy_bypass
=
'\0'
;
sizeof
(
INTERNET_PROXY_INFOA
)
+
proxyBytesRequired
);
*
((
LPSTR
)(
pPI
->
lpszProxyBypass
))
=
'\0'
;
}
}
pPI
->
lpszProxyBypass
=
proxy_bypass
;
bSuccess
=
TRUE
;
bSuccess
=
TRUE
;
}
}
*
lpdwBufferLength
=
sizeof
(
INTERNET_PROXY_INFOA
)
+
*
lpdwBufferLength
=
sizeof
(
INTERNET_PROXY_INFOA
)
+
...
@@ -2595,7 +2590,8 @@ BOOL WINAPI InternetTimeToSystemTimeA( LPCSTR string, SYSTEMTIME* time, DWORD re
...
@@ -2595,7 +2590,8 @@ BOOL WINAPI InternetTimeToSystemTimeA( LPCSTR string, SYSTEMTIME* time, DWORD re
BOOL
WINAPI
InternetTimeToSystemTimeW
(
LPCWSTR
string
,
SYSTEMTIME
*
time
,
DWORD
reserved
)
BOOL
WINAPI
InternetTimeToSystemTimeW
(
LPCWSTR
string
,
SYSTEMTIME
*
time
,
DWORD
reserved
)
{
{
unsigned
int
i
;
unsigned
int
i
;
WCHAR
*
s
=
(
LPWSTR
)
string
;
const
WCHAR
*
s
=
string
;
WCHAR
*
end
;
TRACE
(
"%s %p 0x%08x
\n
"
,
debugstr_w
(
string
),
time
,
reserved
);
TRACE
(
"%s %p 0x%08x
\n
"
,
debugstr_w
(
string
),
time
,
reserved
);
...
@@ -2625,7 +2621,8 @@ BOOL WINAPI InternetTimeToSystemTimeW( LPCWSTR string, SYSTEMTIME* time, DWORD r
...
@@ -2625,7 +2621,8 @@ BOOL WINAPI InternetTimeToSystemTimeW( LPCWSTR string, SYSTEMTIME* time, DWORD r
if
(
time
->
wDayOfWeek
>
6
)
return
TRUE
;
if
(
time
->
wDayOfWeek
>
6
)
return
TRUE
;
while
(
*
s
&&
!
isdigitW
(
*
s
))
s
++
;
while
(
*
s
&&
!
isdigitW
(
*
s
))
s
++
;
time
->
wDay
=
strtolW
(
s
,
&
s
,
10
);
time
->
wDay
=
strtolW
(
s
,
&
end
,
10
);
s
=
end
;
while
(
*
s
&&
!
isalphaW
(
*
s
))
s
++
;
while
(
*
s
&&
!
isalphaW
(
*
s
))
s
++
;
if
(
s
[
0
]
==
'\0'
||
s
[
1
]
==
'\0'
||
s
[
2
]
==
'\0'
)
return
TRUE
;
if
(
s
[
0
]
==
'\0'
||
s
[
1
]
==
'\0'
||
s
[
2
]
==
'\0'
)
return
TRUE
;
...
@@ -2645,19 +2642,23 @@ BOOL WINAPI InternetTimeToSystemTimeW( LPCWSTR string, SYSTEMTIME* time, DWORD r
...
@@ -2645,19 +2642,23 @@ BOOL WINAPI InternetTimeToSystemTimeW( LPCWSTR string, SYSTEMTIME* time, DWORD r
while
(
*
s
&&
!
isdigitW
(
*
s
))
s
++
;
while
(
*
s
&&
!
isdigitW
(
*
s
))
s
++
;
if
(
*
s
==
'\0'
)
return
TRUE
;
if
(
*
s
==
'\0'
)
return
TRUE
;
time
->
wYear
=
strtolW
(
s
,
&
s
,
10
);
time
->
wYear
=
strtolW
(
s
,
&
end
,
10
);
s
=
end
;
while
(
*
s
&&
!
isdigitW
(
*
s
))
s
++
;
while
(
*
s
&&
!
isdigitW
(
*
s
))
s
++
;
if
(
*
s
==
'\0'
)
return
TRUE
;
if
(
*
s
==
'\0'
)
return
TRUE
;
time
->
wHour
=
strtolW
(
s
,
&
s
,
10
);
time
->
wHour
=
strtolW
(
s
,
&
end
,
10
);
s
=
end
;
while
(
*
s
&&
!
isdigitW
(
*
s
))
s
++
;
while
(
*
s
&&
!
isdigitW
(
*
s
))
s
++
;
if
(
*
s
==
'\0'
)
return
TRUE
;
if
(
*
s
==
'\0'
)
return
TRUE
;
time
->
wMinute
=
strtolW
(
s
,
&
s
,
10
);
time
->
wMinute
=
strtolW
(
s
,
&
end
,
10
);
s
=
end
;
while
(
*
s
&&
!
isdigitW
(
*
s
))
s
++
;
while
(
*
s
&&
!
isdigitW
(
*
s
))
s
++
;
if
(
*
s
==
'\0'
)
return
TRUE
;
if
(
*
s
==
'\0'
)
return
TRUE
;
time
->
wSecond
=
strtolW
(
s
,
&
s
,
10
);
time
->
wSecond
=
strtolW
(
s
,
&
end
,
10
);
s
=
end
;
time
->
wMilliseconds
=
0
;
time
->
wMilliseconds
=
0
;
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