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
d2ff159f
Commit
d2ff159f
authored
Jul 24, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9b4f0d76
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+1
-1
ipstats.c
dlls/iphlpapi/ipstats.c
+4
-4
No files found.
dlls/iphlpapi/iphlpapi_main.c
View file @
d2ff159f
...
...
@@ -1717,7 +1717,7 @@ DWORD WINAPI GetIfEntry(PMIB_IFROW pIfRow)
*/
DWORD
WINAPI
GetIfEntry2
(
MIB_IF_ROW2
*
row2
)
{
DWORD
ret
,
len
=
sizeof
(
row2
->
Description
)
/
sizeof
(
row2
->
Description
[
0
]
);
DWORD
ret
,
len
=
ARRAY_SIZE
(
row2
->
Description
);
char
buf
[
MAX_ADAPTER_NAME
],
*
name
;
MIB_IFROW
row
;
...
...
dlls/iphlpapi/ipstats.c
View file @
d2ff159f
...
...
@@ -666,7 +666,7 @@ DWORD WINAPI GetIcmpStatisticsEx(PMIB_ICMP_EX stats, DWORD family)
continue
;
}
for
(
i
=
0
;
i
<
sizeof
(
icmpinstatlist
)
/
sizeof
(
icmpinstatlist
[
0
]
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
icmpinstatlist
);
i
++
)
{
if
(
!
strcasecmp
(
buf
,
icmpinstatlist
[
i
].
name
))
{
...
...
@@ -688,7 +688,7 @@ DWORD WINAPI GetIcmpStatisticsEx(PMIB_ICMP_EX stats, DWORD family)
continue
;
}
for
(
i
=
0
;
i
<
sizeof
(
icmpoutstatlist
)
/
sizeof
(
icmpoutstatlist
[
0
]
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
icmpoutstatlist
);
i
++
)
{
if
(
!
strcasecmp
(
buf
,
icmpoutstatlist
[
i
].
name
))
{
...
...
@@ -819,7 +819,7 @@ DWORD WINAPI GetIpStatisticsEx(PMIB_IPSTATS stats, DWORD family)
if
((
ptr
=
strchr
(
value
,
'\n'
)))
*
ptr
=
'\0'
;
for
(
i
=
0
;
i
<
sizeof
(
ipstatlist
)
/
sizeof
(
ipstatlist
[
0
]
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
ipstatlist
);
i
++
)
if
(
!
strcasecmp
(
buf
,
ipstatlist
[
i
].
name
))
{
if
(
sscanf
(
value
,
"%d"
,
&
res
))
*
ipstatlist
[
i
].
elem
=
res
;
...
...
@@ -1209,7 +1209,7 @@ DWORD WINAPI GetUdpStatisticsEx(PMIB_UDPSTATS stats, DWORD family)
if
((
ptr
=
strchr
(
value
,
'\n'
)))
*
ptr
=
'\0'
;
for
(
i
=
0
;
i
<
sizeof
(
udpstatlist
)
/
sizeof
(
udpstatlist
[
0
]
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
udpstatlist
);
i
++
)
if
(
!
strcasecmp
(
buf
,
udpstatlist
[
i
].
name
))
{
if
(
sscanf
(
value
,
"%d"
,
&
res
))
*
udpstatlist
[
i
].
elem
=
res
;
...
...
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