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
455ccf4b
Commit
455ccf4b
authored
Jun 08, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntprint/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1144f092
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
ntprint.c
dlls/ntprint/tests/ntprint.c
+5
-5
No files found.
dlls/ntprint/tests/ntprint.c
View file @
455ccf4b
...
...
@@ -67,7 +67,7 @@ static void test_PSetupCreateMonitorInfo(VOID)
{
HANDLE
mi
;
WCHAR
buffer
[
1024
]
=
{
'\\'
,
'\\'
};
UINT
len
=
sizeof
(
buffer
)
/
sizeof
(
buffer
[
0
]
)
-
2
;
UINT
len
=
ARRAY_SIZE
(
buffer
)
-
2
;
GetComputerNameW
(
buffer
+
2
,
&
len
);
SetLastError
(
0xdeadbeef
);
...
...
@@ -155,7 +155,7 @@ static void test_PSetupEnumMonitor(VOID)
"and '> 0')
\n
"
,
res
,
GetLastError
(),
minsize
);
size
=
sizeof
(
buffer
)
/
sizeof
(
buffer
[
0
]
);
size
=
ARRAY_SIZE
(
buffer
);
if
((
minsize
+
1
)
>
size
)
{
skip
(
"overflow: %u
\n
"
,
minsize
);
pPSetupDestroyMonitorInfo
(
mi
);
...
...
@@ -165,7 +165,7 @@ static void test_PSetupEnumMonitor(VOID)
if
(
0
)
{
/* XP: ERROR_INVALID_PARAMETER, w2k: Crash */
SetLastError
(
0xdeadbeef
);
size
=
sizeof
(
buffer
)
/
sizeof
(
buffer
[
0
]
);
size
=
ARRAY_SIZE
(
buffer
);
res
=
pPSetupEnumMonitor
(
NULL
,
0
,
buffer
,
&
size
);
ok
(
!
res
&&
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
),
"got %u with %u (expected '0' with ERROR_INVALID_PARAMETER)
\n
"
,
...
...
@@ -175,7 +175,7 @@ static void test_PSetupEnumMonitor(VOID)
if
(
0
)
{
/* XP: Crash, w2k: Success (how can that work?) */
SetLastError
(
0xdeadbeef
);
size
=
sizeof
(
buffer
)
/
sizeof
(
buffer
[
0
]
);
size
=
ARRAY_SIZE
(
buffer
);
res
=
pPSetupEnumMonitor
(
mi
,
0
,
NULL
,
&
size
);
trace
(
"got %u with %u and %u
\n
"
,
res
,
GetLastError
(),
size
);
}
...
...
@@ -213,7 +213,7 @@ static void test_PSetupEnumMonitor(VOID)
while
(
res
&&
(
index
<
20
))
{
SetLastError
(
0xdeadbeef
);
buffer
[
0
]
=
'\0'
;
size
=
sizeof
(
buffer
)
/
sizeof
(
buffer
[
0
]
);
size
=
ARRAY_SIZE
(
buffer
);
res
=
pPSetupEnumMonitor
(
mi
,
index
,
buffer
,
&
size
);
ok
(
res
||
(
GetLastError
()
==
ERROR_NO_MORE_ITEMS
),
"(%u) got %u with %u and %u (expected '!=0' or: '0' with "
...
...
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