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
910d5852
Commit
910d5852
authored
Jun 10, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Jun 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Return ERROR_NO_DATA from GetIpNetTable() if no entries are found.
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
parent
f3978074
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+7
-0
iphlpapi.c
dlls/iphlpapi/tests/iphlpapi.c
+4
-4
No files found.
dlls/iphlpapi/iphlpapi_main.c
View file @
910d5852
...
...
@@ -2326,6 +2326,13 @@ DWORD WINAPI GetIpNetTable( MIB_IPNETTABLE *table, ULONG *size, BOOL sort )
}
table
->
dwNumEntries
=
count
;
if
(
!
count
)
{
err
=
ERROR_NO_DATA
;
goto
err
;
}
for
(
i
=
0
;
i
<
count
;
i
++
)
{
MIB_IPNETROW
*
row
=
table
->
table
+
i
;
...
...
dlls/iphlpapi/tests/iphlpapi.c
View file @
910d5852
...
...
@@ -388,11 +388,11 @@ static void testGetIpNetTable(void)
else
if
(
apiReturn
==
ERROR_INSUFFICIENT_BUFFER
)
{
PMIB_IPNETTABLE
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwSize
);
memset
(
buf
,
0xcc
,
dwSize
);
apiReturn
=
GetIpNetTable
(
buf
,
&
dwSize
,
FALSE
);
ok
(
apiReturn
==
NO_ERROR
||
apiReturn
==
ERROR_NO_DATA
,
/* empty ARP table's okay */
"GetIpNetTable(buf, &dwSize, FALSE) returned %ld, expected NO_ERROR
\n
"
,
apiReturn
);
ok
((
apiReturn
==
NO_ERROR
&&
buf
->
dwNumEntries
)
||
(
apiReturn
==
ERROR_NO_DATA
&&
!
buf
->
dwNumEntries
),
"got apiReturn %lu, dwSize %lu, buf->dwNumEntries %lu.
\n
"
,
apiReturn
,
dwSize
,
buf
->
dwNumEntries
);
if
(
apiReturn
==
NO_ERROR
&&
winetest_debug
>
1
)
{
...
...
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