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
bd6c1662
Commit
bd6c1662
authored
Nov 03, 2014
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Simplify empty string check (PVS-Studio).
parent
89d91168
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
registry.c
dlls/advapi32/tests/registry.c
+5
-6
service.c
dlls/advapi32/tests/service.c
+4
-4
No files found.
dlls/advapi32/tests/registry.c
View file @
bd6c1662
...
...
@@ -1546,7 +1546,7 @@ static void test_reg_query_value(void)
ret
=
RegQueryValueA
(
hkey_main
,
"subkey"
,
val
,
NULL
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
lstrlenA
(
val
)
==
0
,
"Expected val to be untouched, got %s
\n
"
,
val
);
ok
(
!
val
[
0
]
,
"Expected val to be untouched, got %s
\n
"
,
val
);
/* try a NULL value and size */
ret
=
RegQueryValueA
(
hkey_main
,
"subkey"
,
NULL
,
NULL
);
...
...
@@ -1559,7 +1559,7 @@ static void test_reg_query_value(void)
ret
=
RegQueryValueA
(
hkey_main
,
"subkey"
,
val
,
&
size
);
ok
(
ret
==
ERROR_MORE_DATA
,
"Expected ERROR_MORE_DATA, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
lstrlenA
(
val
)
==
0
,
"Expected val to be untouched, got %s
\n
"
,
val
);
ok
(
!
val
[
0
]
,
"Expected val to be untouched, got %s
\n
"
,
val
);
ok
(
size
==
5
,
"Expected 5, got %d
\n
"
,
size
);
/* successfully read the value using 'subkey' */
...
...
@@ -1588,7 +1588,7 @@ static void test_reg_query_value(void)
}
ok
(
ret
==
ERROR_MORE_DATA
,
"Expected ERROR_MORE_DATA, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
lstrlenW
(
valW
)
==
0
,
"Expected valW to be untouched
\n
"
);
ok
(
!
valW
[
0
]
,
"Expected valW to be untouched
\n
"
);
ok
(
size
==
sizeof
(
expected
),
"Got wrong size: %d
\n
"
,
size
);
/* unicode - try size in WCHARS */
...
...
@@ -1597,7 +1597,7 @@ static void test_reg_query_value(void)
ret
=
RegQueryValueW
(
subkey
,
NULL
,
valW
,
&
size
);
ok
(
ret
==
ERROR_MORE_DATA
,
"Expected ERROR_MORE_DATA, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
lstrlenW
(
valW
)
==
0
,
"Expected valW to be untouched
\n
"
);
ok
(
!
valW
[
0
]
,
"Expected valW to be untouched
\n
"
);
ok
(
size
==
sizeof
(
expected
),
"Got wrong size: %d
\n
"
,
size
);
/* unicode - successfully read the value */
...
...
@@ -1764,8 +1764,7 @@ static void test_reg_delete_tree(void)
ret
=
RegQueryValueA
(
subkey
,
NULL
,
buffer
,
&
size
);
ok
(
ret
==
ERROR_SUCCESS
,
"Default value of subkey is not present
\n
"
);
ok
(
!
lstrlenA
(
buffer
),
"Expected length 0 got length %u(%s)
\n
"
,
lstrlenA
(
buffer
),
buffer
);
ok
(
!
buffer
[
0
],
"Expected length 0 got length %u(%s)
\n
"
,
lstrlenA
(
buffer
),
buffer
);
size
=
MAX_PATH
;
ok
(
RegQueryValueA
(
subkey
,
"value"
,
buffer
,
&
size
),
"Value is still present
\n
"
);
...
...
dlls/advapi32/tests/service.c
View file @
bd6c1662
...
...
@@ -1398,8 +1398,8 @@ static void test_enum_svc(void)
SERVICE_STATUS
status
=
services
[
i
].
ServiceStatus
;
/* lpServiceName and lpDisplayName should always be filled */
ok
(
lstrlenA
(
services
[
i
].
lpServiceName
)
>
0
,
"Expected a service name
\n
"
);
ok
(
lstrlenA
(
services
[
i
].
lpDisplayName
)
>
0
,
"Expected a display name
\n
"
);
ok
(
services
[
i
].
lpServiceName
[
0
]
,
"Expected a service name
\n
"
);
ok
(
services
[
i
].
lpDisplayName
[
0
]
,
"Expected a display name
\n
"
);
/* Decrement the counters to see if the functions calls return the same
* numbers as the contents of these structures.
...
...
@@ -1701,8 +1701,8 @@ static void test_enum_svc(void)
SERVICE_STATUS_PROCESS
status
=
exservices
[
i
].
ServiceStatusProcess
;
/* lpServiceName and lpDisplayName should always be filled */
ok
(
lstrlenA
(
exservices
[
i
].
lpServiceName
)
>
0
,
"Expected a service name
\n
"
);
ok
(
lstrlenA
(
exservices
[
i
].
lpDisplayName
)
>
0
,
"Expected a display name
\n
"
);
ok
(
exservices
[
i
].
lpServiceName
[
0
]
,
"Expected a service name
\n
"
);
ok
(
exservices
[
i
].
lpDisplayName
[
0
]
,
"Expected a display name
\n
"
);
/* Decrement the counters to see if the functions calls return the
* same numbers as the contents of these structures.
...
...
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