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
290ddd8e
Commit
290ddd8e
authored
Jun 13, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Use lstrlenA instead of strlen in ok() to avoid printf format warnings.
parent
0da92ec9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
crypt.c
dlls/advapi32/tests/crypt.c
+1
-1
registry.c
dlls/advapi32/tests/registry.c
+4
-4
security.c
dlls/advapi32/tests/security.c
+1
-1
No files found.
dlls/advapi32/tests/crypt.c
View file @
290ddd8e
...
...
@@ -764,7 +764,7 @@ static void test_set_provider_ex(void)
result
=
pCryptGetDefaultProviderA
(
PROV_RSA_FULL
,
NULL
,
CRYPT_MACHINE_DEFAULT
,
pszProvName
,
&
cbProvName
);
ok
(
result
&&
!
strcmp
(
MS_DEF_PROV
,
pszProvName
),
"expected %s, got %s
\n
"
,
MS_DEF_PROV
,
pszProvName
);
ok
(
result
&&
cbProvName
==
(
strlen
(
MS_DEF_PROV
)
+
1
),
"expected %i, got %ld
\n
"
,
(
strlen
(
MS_DEF_PROV
)
+
1
),
cbProvName
);
ok
(
result
&&
cbProvName
==
(
strlen
(
MS_DEF_PROV
)
+
1
),
"expected %i, got %ld
\n
"
,
(
lstrlenA
(
MS_DEF_PROV
)
+
1
),
cbProvName
);
LocalFree
(
pszProvName
);
}
...
...
dlls/advapi32/tests/registry.c
View file @
290ddd8e
...
...
@@ -439,7 +439,7 @@ static void test_get_value(void)
buf
[
0
]
=
0
;
type
=
0xdeadbeef
;
size
=
sizeof
(
buf
);
ret
=
pRegGetValueA
(
hkey_main
,
NULL
,
"TP1_SZ"
,
RRF_RT_REG_SZ
,
&
type
,
buf
,
&
size
);
ok
(
ret
==
ERROR_SUCCESS
,
"ret=%ld
\n
"
,
ret
);
ok
(
size
==
strlen
(
sTestpath1
)
+
1
,
"strlen(sTestpath1)=%d size=%ld
\n
"
,
strlen
(
sTestpath1
),
size
);
ok
(
size
==
strlen
(
sTestpath1
)
+
1
,
"strlen(sTestpath1)=%d size=%ld
\n
"
,
lstrlenA
(
sTestpath1
),
size
);
ok
(
type
==
REG_SZ
,
"type=%ld
\n
"
,
type
);
ok
(
!
strcmp
(
sTestpath1
,
buf
),
"sTestpath=
\"
%s
\"
buf=
\"
%s
\"\n
"
,
sTestpath1
,
buf
);
...
...
@@ -447,7 +447,7 @@ static void test_get_value(void)
buf
[
0
]
=
0
;
type
=
0xdeadbeef
;
size
=
sizeof
(
buf
);
ret
=
pRegGetValueA
(
hkey_main
,
NULL
,
"TP1_SZ"
,
RRF_RT_REG_SZ
|
RRF_NOEXPAND
,
&
type
,
buf
,
&
size
);
ok
(
ret
==
ERROR_SUCCESS
,
"ret=%ld
\n
"
,
ret
);
ok
(
size
==
strlen
(
sTestpath1
)
+
1
,
"strlen(sTestpath1)=%d size=%ld
\n
"
,
strlen
(
sTestpath1
),
size
);
ok
(
size
==
strlen
(
sTestpath1
)
+
1
,
"strlen(sTestpath1)=%d size=%ld
\n
"
,
lstrlenA
(
sTestpath1
),
size
);
ok
(
type
==
REG_SZ
,
"type=%ld
\n
"
,
type
);
ok
(
!
strcmp
(
sTestpath1
,
buf
),
"sTestpath=
\"
%s
\"
buf=
\"
%s
\"\n
"
,
sTestpath1
,
buf
);
...
...
@@ -457,7 +457,7 @@ static void test_get_value(void)
ok
(
ret
==
ERROR_SUCCESS
,
"ret=%ld
\n
"
,
ret
);
/* At least v5.2.3790.1830 (2003 SP1) returns the unexpanded sTestpath1 length + 1 here. */
ok
((
size
==
strlen
(
expanded
)
+
1
)
||
(
size
==
strlen
(
sTestpath1
)
+
1
),
"strlen(expanded)=%d, strlen(sTestpath1)=%d, size=%ld
\n
"
,
strlen
(
expanded
),
strlen
(
sTestpath1
),
size
);
"strlen(expanded)=%d, strlen(sTestpath1)=%d, size=%ld
\n
"
,
lstrlenA
(
expanded
),
lstrlenA
(
sTestpath1
),
size
);
ok
(
type
==
REG_SZ
,
"type=%ld
\n
"
,
type
);
ok
(
!
strcmp
(
expanded
,
buf
),
"expanded=
\"
%s
\"
buf=
\"
%s
\"\n
"
,
expanded
,
buf
);
...
...
@@ -465,7 +465,7 @@ static void test_get_value(void)
buf
[
0
]
=
0
;
type
=
0xdeadbeef
;
size
=
sizeof
(
buf
);
ret
=
pRegGetValueA
(
hkey_main
,
NULL
,
"TP1_EXP_SZ"
,
RRF_RT_REG_EXPAND_SZ
|
RRF_NOEXPAND
,
&
type
,
buf
,
&
size
);
ok
(
ret
==
ERROR_SUCCESS
,
"ret=%ld
\n
"
,
ret
);
ok
(
size
==
strlen
(
sTestpath1
)
+
1
,
"strlen(sTestpath1)=%d size=%ld
\n
"
,
strlen
(
sTestpath1
),
size
);
ok
(
size
==
strlen
(
sTestpath1
)
+
1
,
"strlen(sTestpath1)=%d size=%ld
\n
"
,
lstrlenA
(
sTestpath1
),
size
);
ok
(
type
==
REG_EXPAND_SZ
,
"type=%ld
\n
"
,
type
);
ok
(
!
strcmp
(
sTestpath1
,
buf
),
"sTestpath=
\"
%s
\"
buf=
\"
%s
\"\n
"
,
sTestpath1
,
buf
);
...
...
dlls/advapi32/tests/security.c
View file @
290ddd8e
...
...
@@ -405,7 +405,7 @@ static void test_lookupPrivilegeName(void)
ok
(
cchName
==
strlen
(
"SeCreateTokenPrivilege"
)
+
1
,
"LookupPrivilegeNameA returned an incorrect required length for
\n
"
"SeCreateTokenPrivilege (got %ld, expected %d)
\n
"
,
cchName
,
strlen
(
"SeCreateTokenPrivilege"
)
+
1
);
lstrlenA
(
"SeCreateTokenPrivilege"
)
+
1
);
/* check a known value and its returned length on success */
cchName
=
sizeof
(
buf
);
ok
(
pLookupPrivilegeNameA
(
NULL
,
&
luid
,
buf
,
&
cchName
)
&&
...
...
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