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
97936252
Commit
97936252
authored
Jul 17, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Code clean up by using heap_strdup* functions.
parent
13974e9d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
20 deletions
+6
-20
http.c
dlls/wininet/http.c
+6
-20
No files found.
dlls/wininet/http.c
View file @
97936252
...
...
@@ -1074,7 +1074,7 @@ HINTERNET WINAPI HttpOpenRequestA(HINTERNET hHttpSession,
{
LPWSTR
szVerb
=
NULL
,
szObjectName
=
NULL
;
LPWSTR
szVersion
=
NULL
,
szReferrer
=
NULL
,
*
szAcceptTypes
=
NULL
;
INT
len
,
acceptTypesCount
;
INT
acceptTypesCount
;
HINTERNET
rc
=
FALSE
;
LPCSTR
*
types
;
...
...
@@ -1085,38 +1085,30 @@ HINTERNET WINAPI HttpOpenRequestA(HINTERNET hHttpSession,
if
(
lpszVerb
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszVerb
,
-
1
,
NULL
,
0
);
szVerb
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
szVerb
=
heap_strdupAtoW
(
lpszVerb
);
if
(
!
szVerb
)
goto
end
;
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszVerb
,
-
1
,
szVerb
,
len
);
}
if
(
lpszObjectName
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszObjectName
,
-
1
,
NULL
,
0
);
szObjectName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
szObjectName
=
heap_strdupAtoW
(
lpszObjectName
);
if
(
!
szObjectName
)
goto
end
;
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszObjectName
,
-
1
,
szObjectName
,
len
);
}
if
(
lpszVersion
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszVersion
,
-
1
,
NULL
,
0
);
szVersion
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
szVersion
=
heap_strdupAtoW
(
lpszVersion
);
if
(
!
szVersion
)
goto
end
;
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszVersion
,
-
1
,
szVersion
,
len
);
}
if
(
lpszReferrer
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszReferrer
,
-
1
,
NULL
,
0
);
szReferrer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
szReferrer
=
heap_strdupAtoW
(
lpszReferrer
);
if
(
!
szReferrer
)
goto
end
;
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszReferrer
,
-
1
,
szReferrer
,
len
);
}
if
(
lpszAcceptTypes
)
...
...
@@ -1151,13 +1143,7 @@ HINTERNET WINAPI HttpOpenRequestA(HINTERNET hHttpSession,
__TRY
{
if
(
*
types
&&
**
types
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
*
types
,
-
1
,
NULL
,
0
);
szAcceptTypes
[
acceptTypesCount
]
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
*
types
,
-
1
,
szAcceptTypes
[
acceptTypesCount
],
len
);
acceptTypesCount
++
;
}
szAcceptTypes
[
acceptTypesCount
++
]
=
heap_strdupAtoW
(
*
types
);
}
__EXCEPT_PAGE_FAULT
{
...
...
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