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
02472551
Commit
02472551
authored
Jul 02, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Jul 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Don't check for out of memory (Coverity).
parent
eddc78e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
20 deletions
+13
-20
misc.c
dlls/urlmon/tests/misc.c
+13
-20
No files found.
dlls/urlmon/tests/misc.c
View file @
02472551
...
...
@@ -1191,26 +1191,19 @@ static void test_user_agent(void)
ok
(
size
>
0
,
"size=%d, expected non-zero
\n
"
,
size
);
str2
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
size
+
20
)
*
sizeof
(
CHAR
));
if
(
!
str2
)
{
skip
(
"skipping rest of ObtainUserAgent tests, out of memory
\n
"
);
}
else
{
saved
=
size
;
hres
=
ObtainUserAgentString
(
0
,
str2
,
&
size
);
ok
(
hres
==
S_OK
,
"ObtainUserAgentString failed: %08x
\n
"
,
hres
);
ok
(
size
==
saved
,
"size=%d, expected %d
\n
"
,
size
,
saved
);
ok
(
strlen
(
expected
)
<=
strlen
(
str2
)
&&
!
memcmp
(
expected
,
str2
,
strlen
(
expected
)
*
sizeof
(
CHAR
)),
"user agent was
\"
%s
\"
, expected to start with
\"
%s
\"\n
"
,
str2
,
expected
);
size
=
saved
+
10
;
hres
=
ObtainUserAgentString
(
0
,
str2
,
&
size
);
ok
(
hres
==
S_OK
,
"ObtainUserAgentString failed: %08x
\n
"
,
hres
);
ok
(
size
==
saved
,
"size=%d, expected %d
\n
"
,
size
,
saved
);
}
saved
=
size
;
hres
=
ObtainUserAgentString
(
0
,
str2
,
&
size
);
ok
(
hres
==
S_OK
,
"ObtainUserAgentString failed: %08x
\n
"
,
hres
);
ok
(
size
==
saved
,
"size=%d, expected %d
\n
"
,
size
,
saved
);
ok
(
strlen
(
expected
)
<=
strlen
(
str2
)
&&
!
memcmp
(
expected
,
str2
,
strlen
(
expected
)
*
sizeof
(
CHAR
)),
"user agent was
\"
%s
\"
, expected to start with
\"
%s
\"\n
"
,
str2
,
expected
);
size
=
saved
+
10
;
hres
=
ObtainUserAgentString
(
0
,
str2
,
&
size
);
ok
(
hres
==
S_OK
,
"ObtainUserAgentString failed: %08x
\n
"
,
hres
);
ok
(
size
==
saved
,
"size=%d, expected %d
\n
"
,
size
,
saved
);
size
=
0
;
hres
=
UrlMkGetSessionOption
(
URLMON_OPTION_USERAGENT
,
NULL
,
0
,
&
size
,
0
);
...
...
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