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
de38a9e4
Commit
de38a9e4
authored
Nov 09, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: Use the ARRAY_SIZE() macro and better types.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4600169f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
mpi.c
dlls/rsaenh/mpi.c
+2
-2
rsa.c
dlls/rsaenh/rsa.c
+3
-2
No files found.
dlls/rsaenh/mpi.c
View file @
de38a9e4
...
...
@@ -3378,9 +3378,9 @@ static const struct {
/* returns # of RM trials required for a given bit size */
int
mp_prime_rabin_miller_trials
(
int
size
)
{
int
x
;
unsigned
int
x
;
for
(
x
=
0
;
x
<
(
int
)(
sizeof
(
sizes
)
/
(
sizeof
(
sizes
[
0
]))
);
x
++
)
{
for
(
x
=
0
;
x
<
ARRAY_SIZE
(
sizes
);
x
++
)
{
if
(
sizes
[
x
].
k
==
size
)
{
return
sizes
[
x
].
t
;
}
else
if
(
sizes
[
x
].
k
>
size
)
{
...
...
dlls/rsaenh/rsa.c
View file @
de38a9e4
...
...
@@ -29,6 +29,7 @@
*/
#include "tomcrypt.h"
#include "windef.h"
static
const
struct
{
int
mpi_code
,
ltc_code
;
...
...
@@ -41,9 +42,9 @@ static const struct {
/* convert a MPI error to a LTC error (Possibly the most powerful function ever! Oh wait... no) */
static
int
mpi_to_ltc_error
(
int
err
)
{
int
x
;
unsigned
int
x
;
for
(
x
=
0
;
x
<
(
int
)(
sizeof
(
mpi_to_ltc_codes
)
/
sizeof
(
mpi_to_ltc_codes
[
0
])
);
x
++
)
{
for
(
x
=
0
;
x
<
ARRAY_SIZE
(
mpi_to_ltc_codes
);
x
++
)
{
if
(
err
==
mpi_to_ltc_codes
[
x
].
mpi_code
)
{
return
mpi_to_ltc_codes
[
x
].
ltc_code
;
}
...
...
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