Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
3afda68c
Commit
3afda68c
authored
15 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
advapi32/tests: Use explicit prototypes for function pointers.
parent
312429fb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/advapi32/tests/crypt_sha.c
+12
-11
12 additions, 11 deletions
dlls/advapi32/tests/crypt_sha.c
with
12 additions
and
11 deletions
dlls/advapi32/tests/crypt_sha.c
+
12
−
11
View file @
3afda68c
...
...
@@ -35,21 +35,22 @@ typedef struct {
static
void
test_sha_ctx
(
void
)
{
FARPROC
pA_SHAInit
,
pA_SHAUpdate
,
pA_SHAFinal
;
static
const
char
test_buffer
[]
=
"In our Life there's If"
"In our beliefs there's Lie"
"In our business there is Sin"
"In our bodies, there is Die"
;
ULONG
test_buffer_size
=
strlen
(
test_buffer
);
void
(
WINAPI
*
pA_SHAInit
)(
PSHA_CTX
);
void
(
WINAPI
*
pA_SHAUpdate
)(
PSHA_CTX
,
const
unsigned
char
*
,
UINT
);
void
(
WINAPI
*
pA_SHAFinal
)(
PSHA_CTX
,
PULONG
);
static
const
unsigned
char
test_buffer
[]
=
"In our Life there's If"
"In our beliefs there's Lie"
"In our business there is Sin"
"In our bodies, there is Die"
;
HMODULE
hmod
;
SHA_CTX
ctx
;
ULONG
result
[
5
];
ULONG
result_correct
[
5
]
=
{
0xe014f93
,
0xe09791ec
,
0x6dcf96c8
,
0x8e9385fc
,
0x1611c1bb
};
hmod
=
GetModuleHandleA
(
"advapi32.dll"
);
pA_SHAInit
=
GetProcAddress
(
hmod
,
"A_SHAInit"
);
pA_SHAUpdate
=
GetProcAddress
(
hmod
,
"A_SHAUpdate"
);
pA_SHAFinal
=
GetProcAddress
(
hmod
,
"A_SHAFinal"
);
pA_SHAInit
=
(
void
*
)
GetProcAddress
(
hmod
,
"A_SHAInit"
);
pA_SHAUpdate
=
(
void
*
)
GetProcAddress
(
hmod
,
"A_SHAUpdate"
);
pA_SHAFinal
=
(
void
*
)
GetProcAddress
(
hmod
,
"A_SHAFinal"
);
if
(
!
pA_SHAInit
||
!
pA_SHAUpdate
||
!
pA_SHAFinal
)
{
...
...
@@ -59,8 +60,8 @@ static void test_sha_ctx(void)
RtlZeroMemory
(
&
ctx
,
sizeof
(
ctx
));
pA_SHAInit
(
&
ctx
);
pA_SHAUpdate
(
&
ctx
,
test_buffer
,
test_buffer
_size
);
pA_SHAUpdate
(
&
ctx
,
test_buffer
,
test_buffer
_size
);
pA_SHAUpdate
(
&
ctx
,
test_buffer
,
sizeof
(
test_buffer
)
-
1
);
pA_SHAUpdate
(
&
ctx
,
test_buffer
,
sizeof
(
test_buffer
)
-
1
);
pA_SHAFinal
(
&
ctx
,
result
);
ok
(
!
memcmp
(
result
,
result_correct
,
sizeof
(
result
)),
"incorrect result
\n
"
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment