Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
2fc7b810
Commit
2fc7b810
authored
Jan 13, 2009
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Remove superfluous pointer casts.
parent
7eb3abc1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
17 deletions
+17
-17
crypt.c
dlls/advapi32/tests/crypt.c
+6
-6
crypt_lmhash.c
dlls/advapi32/tests/crypt_lmhash.c
+1
-1
crypt_md4.c
dlls/advapi32/tests/crypt_md4.c
+1
-1
crypt_md5.c
dlls/advapi32/tests/crypt_md5.c
+1
-1
security.c
dlls/advapi32/tests/security.c
+8
-8
No files found.
dlls/advapi32/tests/crypt.c
View file @
2fc7b810
...
@@ -461,8 +461,8 @@ static BOOL FindProvRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszProvNam
...
@@ -461,8 +461,8 @@ static BOOL FindProvRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszProvNam
RegQueryInfoKey
(
hKey
,
NULL
,
NULL
,
NULL
,
pdwProvCount
,
pcbProvName
,
RegQueryInfoKey
(
hKey
,
NULL
,
NULL
,
NULL
,
pdwProvCount
,
pcbProvName
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
(
*
pcbProvName
)
++
;
(
*
pcbProvName
)
++
;
if
(
!
(
*
pszProvName
=
((
LPSTR
)
LocalAlloc
(
LMEM_ZEROINIT
,
*
pcbProvName
)
)))
if
(
!
(
*
pszProvName
=
LocalAlloc
(
LMEM_ZEROINIT
,
*
pcbProvName
)))
return
FALSE
;
return
FALSE
;
RegEnumKeyEx
(
hKey
,
dwIndex
,
*
pszProvName
,
pcbProvName
,
NULL
,
NULL
,
NULL
,
NULL
);
RegEnumKeyEx
(
hKey
,
dwIndex
,
*
pszProvName
,
pcbProvName
,
NULL
,
NULL
,
NULL
,
NULL
);
...
@@ -518,7 +518,7 @@ static void test_enum_providers(void)
...
@@ -518,7 +518,7 @@ static void test_enum_providers(void)
/* alloc provider to half the size required
/* alloc provider to half the size required
* cbName holds the size required */
* cbName holds the size required */
providerLen
=
cbName
/
2
;
providerLen
=
cbName
/
2
;
if
(
!
(
provider
=
((
LPSTR
)
LocalAlloc
(
LMEM_ZEROINIT
,
providerLen
)
)))
if
(
!
(
provider
=
LocalAlloc
(
LMEM_ZEROINIT
,
providerLen
)))
return
;
return
;
result
=
pCryptEnumProvidersA
(
dwIndex
,
NULL
,
0
,
&
type
,
provider
,
&
providerLen
);
result
=
pCryptEnumProvidersA
(
dwIndex
,
NULL
,
0
,
&
type
,
provider
,
&
providerLen
);
...
@@ -546,7 +546,7 @@ static void test_enum_providers(void)
...
@@ -546,7 +546,7 @@ static void test_enum_providers(void)
/* check expected versus actual values returned */
/* check expected versus actual values returned */
result
=
pCryptEnumProvidersA
(
dwIndex
,
NULL
,
0
,
&
type
,
NULL
,
&
providerLen
);
result
=
pCryptEnumProvidersA
(
dwIndex
,
NULL
,
0
,
&
type
,
NULL
,
&
providerLen
);
ok
(
result
&&
providerLen
==
cbName
,
"expected %i, got %i
\n
"
,
(
int
)
cbName
,
(
int
)
providerLen
);
ok
(
result
&&
providerLen
==
cbName
,
"expected %i, got %i
\n
"
,
(
int
)
cbName
,
(
int
)
providerLen
);
if
(
!
(
provider
=
((
LPSTR
)
LocalAlloc
(
LMEM_ZEROINIT
,
providerLen
)
)))
if
(
!
(
provider
=
LocalAlloc
(
LMEM_ZEROINIT
,
providerLen
)))
return
;
return
;
providerLen
=
0xdeadbeef
;
providerLen
=
0xdeadbeef
;
...
@@ -670,7 +670,7 @@ static void test_enum_provider_types(void)
...
@@ -670,7 +670,7 @@ static void test_enum_provider_types(void)
/* alloc provider type to half the size required
/* alloc provider type to half the size required
* cbTypeName holds the size required */
* cbTypeName holds the size required */
typeNameSize
=
cbTypeName
/
2
;
typeNameSize
=
cbTypeName
/
2
;
if
(
!
(
typeName
=
((
LPSTR
)
LocalAlloc
(
LMEM_ZEROINIT
,
typeNameSize
)
)))
if
(
!
(
typeName
=
LocalAlloc
(
LMEM_ZEROINIT
,
typeNameSize
)))
goto
cleanup
;
goto
cleanup
;
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
@@ -700,7 +700,7 @@ static void test_enum_provider_types(void)
...
@@ -700,7 +700,7 @@ static void test_enum_provider_types(void)
/* check expected versus actual values returned */
/* check expected versus actual values returned */
result
=
pCryptEnumProviderTypesA
(
index
,
NULL
,
0
,
&
provType
,
NULL
,
&
typeNameSize
);
result
=
pCryptEnumProviderTypesA
(
index
,
NULL
,
0
,
&
provType
,
NULL
,
&
typeNameSize
);
ok
(
result
&&
typeNameSize
==
cbTypeName
,
"expected %d, got %d
\n
"
,
cbTypeName
,
typeNameSize
);
ok
(
result
&&
typeNameSize
==
cbTypeName
,
"expected %d, got %d
\n
"
,
cbTypeName
,
typeNameSize
);
if
(
!
(
typeName
=
((
LPSTR
)
LocalAlloc
(
LMEM_ZEROINIT
,
typeNameSize
)
)))
if
(
!
(
typeName
=
LocalAlloc
(
LMEM_ZEROINIT
,
typeNameSize
)))
goto
cleanup
;
goto
cleanup
;
typeNameSize
=
0xdeadbeef
;
typeNameSize
=
0xdeadbeef
;
...
...
dlls/advapi32/tests/crypt_lmhash.c
View file @
2fc7b810
...
@@ -259,7 +259,7 @@ static void test_SystemFunction004(void)
...
@@ -259,7 +259,7 @@ static void test_SystemFunction004(void)
key
.
Length
=
0x100
;
key
.
Length
=
0x100
;
key
.
MaximumLength
=
0x100
;
key
.
MaximumLength
=
0x100
;
r
=
pSystemFunction004
(
&
in
,
&
key
,
(
struct
ustring
*
)
&
out
);
r
=
pSystemFunction004
(
&
in
,
&
key
,
&
out
);
ok
(
r
==
STATUS_BUFFER_TOO_SMALL
,
"function failed
\n
"
);
ok
(
r
==
STATUS_BUFFER_TOO_SMALL
,
"function failed
\n
"
);
in
.
Buffer
=
inbuf
;
in
.
Buffer
=
inbuf
;
...
...
dlls/advapi32/tests/crypt_md4.c
View file @
2fc7b810
...
@@ -49,7 +49,7 @@ fnSystemFunction007 pSystemFunction007;
...
@@ -49,7 +49,7 @@ fnSystemFunction007 pSystemFunction007;
md4hashfunc
pSystemFunction010
;
md4hashfunc
pSystemFunction010
;
md4hashfunc
pSystemFunction011
;
md4hashfunc
pSystemFunction011
;
#define ctxcmp( a, b ) memcmp(
(char*)a, (char*)
b, FIELD_OFFSET( MD4_CTX, in ) )
#define ctxcmp( a, b ) memcmp(
a,
b, FIELD_OFFSET( MD4_CTX, in ) )
static
void
test_md4_ctx
(
void
)
static
void
test_md4_ctx
(
void
)
{
{
...
...
dlls/advapi32/tests/crypt_md5.c
View file @
2fc7b810
...
@@ -41,7 +41,7 @@ fnMD5Init pMD5Init;
...
@@ -41,7 +41,7 @@ fnMD5Init pMD5Init;
fnMD5Update
pMD5Update
;
fnMD5Update
pMD5Update
;
fnMD5Final
pMD5Final
;
fnMD5Final
pMD5Final
;
#define ctxcmp( a, b ) memcmp(
(char*)a, (char*)
b, FIELD_OFFSET( MD5_CTX, in ) )
#define ctxcmp( a, b ) memcmp(
a,
b, FIELD_OFFSET( MD5_CTX, in ) )
static
void
test_md5_ctx
(
void
)
static
void
test_md5_ctx
(
void
)
{
{
...
...
dlls/advapi32/tests/security.c
View file @
2fc7b810
...
@@ -240,7 +240,7 @@ static void test_sid(void)
...
@@ -240,7 +240,7 @@ static void test_sid(void)
GetLastError
()
);
GetLastError
()
);
ok
(
pConvertStringSidToSidA
(
"S-1-5-21-93476-23408-4576"
,
&
psid
),
"ConvertStringSidToSidA failed
\n
"
);
ok
(
pConvertStringSidToSidA
(
"S-1-5-21-93476-23408-4576"
,
&
psid
),
"ConvertStringSidToSidA failed
\n
"
);
pisid
=
(
SID
*
)
psid
;
pisid
=
psid
;
ok
(
pisid
->
SubAuthorityCount
==
4
,
"Invalid sub authority count - expected 4, got %d
\n
"
,
pisid
->
SubAuthorityCount
);
ok
(
pisid
->
SubAuthorityCount
==
4
,
"Invalid sub authority count - expected 4, got %d
\n
"
,
pisid
->
SubAuthorityCount
);
ok
(
pisid
->
SubAuthority
[
0
]
==
21
,
"Invalid subauthority 0 - expceted 21, got %d
\n
"
,
pisid
->
SubAuthority
[
0
]);
ok
(
pisid
->
SubAuthority
[
0
]
==
21
,
"Invalid subauthority 0 - expceted 21, got %d
\n
"
,
pisid
->
SubAuthority
[
0
]);
ok
(
pisid
->
SubAuthority
[
3
]
==
4576
,
"Invalid subauthority 0 - expceted 4576, got %d
\n
"
,
pisid
->
SubAuthority
[
3
]);
ok
(
pisid
->
SubAuthority
[
3
]
==
4576
,
"Invalid subauthority 0 - expceted 4576, got %d
\n
"
,
pisid
->
SubAuthority
[
3
]);
...
@@ -266,7 +266,7 @@ static void test_sid(void)
...
@@ -266,7 +266,7 @@ static void test_sid(void)
r
=
pConvertStringSidToSidA
(
refs
[
i
].
refStr
,
&
psid
);
r
=
pConvertStringSidToSidA
(
refs
[
i
].
refStr
,
&
psid
);
ok
(
r
,
"failed to parse sid string
\n
"
);
ok
(
r
,
"failed to parse sid string
\n
"
);
pisid
=
(
PISID
)
psid
;
pisid
=
psid
;
ok
(
pisid
&&
ok
(
pisid
&&
!
memcmp
(
pisid
->
IdentifierAuthority
.
Value
,
refs
[
i
].
auth
.
Value
,
!
memcmp
(
pisid
->
IdentifierAuthority
.
Value
,
refs
[
i
].
auth
.
Value
,
sizeof
(
refs
[
i
].
auth
)
),
sizeof
(
refs
[
i
].
auth
)
),
...
@@ -373,7 +373,7 @@ static void test_trustee(void)
...
@@ -373,7 +373,7 @@ static void test_trustee(void)
"MultipleTrusteeOperation wrong
\n
"
);
"MultipleTrusteeOperation wrong
\n
"
);
ok
(
trustee
.
TrusteeForm
==
TRUSTEE_IS_SID
,
"TrusteeForm wrong
\n
"
);
ok
(
trustee
.
TrusteeForm
==
TRUSTEE_IS_SID
,
"TrusteeForm wrong
\n
"
);
ok
(
trustee
.
TrusteeType
==
TRUSTEE_IS_UNKNOWN
,
"TrusteeType wrong
\n
"
);
ok
(
trustee
.
TrusteeType
==
TRUSTEE_IS_UNKNOWN
,
"TrusteeType wrong
\n
"
);
ok
(
trustee
.
ptstrName
==
(
LPSTR
)
psid
,
"ptstrName wrong
\n
"
);
ok
(
trustee
.
ptstrName
==
psid
,
"ptstrName wrong
\n
"
);
/* test BuildTrusteeWithObjectsAndSidA (test 1) */
/* test BuildTrusteeWithObjectsAndSidA (test 1) */
memset
(
&
trustee
,
0xff
,
sizeof
trustee
);
memset
(
&
trustee
,
0xff
,
sizeof
trustee
);
...
@@ -2215,7 +2215,7 @@ static void test_SetEntriesInAcl(void)
...
@@ -2215,7 +2215,7 @@ static void test_SetEntriesInAcl(void)
ExplicitAccess
.
Trustee
.
MultipleTrusteeOperation
=
NO_MULTIPLE_TRUSTEE
;
ExplicitAccess
.
Trustee
.
MultipleTrusteeOperation
=
NO_MULTIPLE_TRUSTEE
;
ExplicitAccess
.
Trustee
.
TrusteeForm
=
TRUSTEE_IS_SID
;
ExplicitAccess
.
Trustee
.
TrusteeForm
=
TRUSTEE_IS_SID
;
ExplicitAccess
.
Trustee
.
TrusteeType
=
TRUSTEE_IS_UNKNOWN
;
ExplicitAccess
.
Trustee
.
TrusteeType
=
TRUSTEE_IS_UNKNOWN
;
ExplicitAccess
.
Trustee
.
ptstrName
=
(
LPWSTR
)
EveryoneSid
;
ExplicitAccess
.
Trustee
.
ptstrName
=
EveryoneSid
;
res
=
pSetEntriesInAclW
(
1
,
&
ExplicitAccess
,
OldAcl
,
&
NewAcl
);
res
=
pSetEntriesInAclW
(
1
,
&
ExplicitAccess
,
OldAcl
,
&
NewAcl
);
ok
(
res
==
ERROR_SUCCESS
,
"SetEntriesInAclW failed: %u
\n
"
,
res
);
ok
(
res
==
ERROR_SUCCESS
,
"SetEntriesInAclW failed: %u
\n
"
,
res
);
ok
(
NewAcl
!=
NULL
,
"returned acl was NULL
\n
"
);
ok
(
NewAcl
!=
NULL
,
"returned acl was NULL
\n
"
);
...
@@ -2263,7 +2263,7 @@ static void test_SetEntriesInAcl(void)
...
@@ -2263,7 +2263,7 @@ static void test_SetEntriesInAcl(void)
ExplicitAccess
.
grfAccessMode
=
REVOKE_ACCESS
;
ExplicitAccess
.
grfAccessMode
=
REVOKE_ACCESS
;
ExplicitAccess
.
Trustee
.
TrusteeForm
=
TRUSTEE_IS_SID
;
ExplicitAccess
.
Trustee
.
TrusteeForm
=
TRUSTEE_IS_SID
;
ExplicitAccess
.
Trustee
.
ptstrName
=
(
LPWSTR
)
UsersSid
;
ExplicitAccess
.
Trustee
.
ptstrName
=
UsersSid
;
res
=
pSetEntriesInAclW
(
1
,
&
ExplicitAccess
,
OldAcl
,
&
NewAcl
);
res
=
pSetEntriesInAclW
(
1
,
&
ExplicitAccess
,
OldAcl
,
&
NewAcl
);
ok
(
res
==
ERROR_SUCCESS
,
"SetEntriesInAclW failed: %u
\n
"
,
res
);
ok
(
res
==
ERROR_SUCCESS
,
"SetEntriesInAclW failed: %u
\n
"
,
res
);
ok
(
NewAcl
!=
NULL
,
"returned acl was NULL
\n
"
);
ok
(
NewAcl
!=
NULL
,
"returned acl was NULL
\n
"
);
...
@@ -2508,17 +2508,17 @@ static void test_ConvertSecurityDescriptorToString()
...
@@ -2508,17 +2508,17 @@ static void test_ConvertSecurityDescriptorToString()
size
=
4096
;
size
=
4096
;
pCreateWellKnownSid
(
WinLocalSid
,
NULL
,
sid_buf
,
&
size
);
pCreateWellKnownSid
(
WinLocalSid
,
NULL
,
sid_buf
,
&
size
);
SetSecurityDescriptorOwner
(
&
desc
,
(
PSID
)
sid_buf
,
FALSE
);
SetSecurityDescriptorOwner
(
&
desc
,
sid_buf
,
FALSE
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conversion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conversion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:S-1-2-0"
);
CHECK_RESULT_AND_FREE
(
"O:S-1-2-0"
);
SetSecurityDescriptorOwner
(
&
desc
,
(
PSID
)
sid_buf
,
TRUE
);
SetSecurityDescriptorOwner
(
&
desc
,
sid_buf
,
TRUE
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conversion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conversion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:S-1-2-0"
);
CHECK_RESULT_AND_FREE
(
"O:S-1-2-0"
);
size
=
sizeof
(
sid_buf
);
size
=
sizeof
(
sid_buf
);
pCreateWellKnownSid
(
WinLocalSystemSid
,
NULL
,
sid_buf
,
&
size
);
pCreateWellKnownSid
(
WinLocalSystemSid
,
NULL
,
sid_buf
,
&
size
);
SetSecurityDescriptorOwner
(
&
desc
,
(
PSID
)
sid_buf
,
TRUE
);
SetSecurityDescriptorOwner
(
&
desc
,
sid_buf
,
TRUE
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conversion failed
\n
"
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
&
desc
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conversion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"O:SY"
);
CHECK_RESULT_AND_FREE
(
"O:SY"
);
...
...
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