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
7f99932a
Commit
7f99932a
authored
May 29, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
May 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcrypt/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b908b5e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
bcrypt.c
dlls/bcrypt/tests/bcrypt.c
+3
-3
No files found.
dlls/bcrypt/tests/bcrypt.c
View file @
7f99932a
...
...
@@ -145,7 +145,7 @@ static void format_hash(const UCHAR *bytes, ULONG size, char *buf)
static
int
strcmp_wa
(
const
WCHAR
*
strw
,
const
char
*
stra
)
{
WCHAR
buf
[
512
];
MultiByteToWideChar
(
CP_ACP
,
0
,
stra
,
-
1
,
buf
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]
));
MultiByteToWideChar
(
CP_ACP
,
0
,
stra
,
-
1
,
buf
,
ARRAY_SIZE
(
buf
));
return
lstrcmpW
(
strw
,
buf
);
}
...
...
@@ -229,7 +229,7 @@ static void test_hash(const struct hash_test *test)
NTSTATUS
ret
;
ULONG
len
;
MultiByteToWideChar
(
CP_ACP
,
0
,
test
->
alg
,
-
1
,
alg_name
,
sizeof
(
alg_name
)
/
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
test
->
alg
,
-
1
,
alg_name
,
ARRAY_SIZE
(
alg_name
));
alg
=
NULL
;
ret
=
pBCryptOpenAlgorithmProvider
(
&
alg
,
alg_name
,
MS_PRIMITIVE_PROVIDER
,
0
);
...
...
@@ -349,7 +349,7 @@ static void test_hashes(void)
};
unsigned
i
;
for
(
i
=
0
;
i
<
sizeof
(
tests
)
/
sizeof
(
*
tests
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
tests
);
i
++
)
test_hash
(
tests
+
i
);
}
...
...
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