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
e94df274
Commit
e94df274
authored
Sep 18, 2006
by
Paul Vriens
Committed by
Alexandre Julliard
Sep 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fixed conditional expression (Coverity).
parent
e41c0acc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
reg.c
dlls/ntdll/reg.c
+1
-1
reg.c
dlls/ntdll/tests/reg.c
+11
-0
No files found.
dlls/ntdll/reg.c
View file @
e94df274
...
...
@@ -517,7 +517,7 @@ NTSTATUS WINAPI RtlpNtQueryValueKey( HANDLE handle, ULONG *result_type, PBYTE de
UNICODE_STRING
name
;
NTSTATUS
ret
;
DWORD
dwResultLen
;
DWORD
dwLen
=
sizeof
(
KEY_VALUE_PARTIAL_INFORMATION
)
+
result_len
?
*
result_len
:
0
;
DWORD
dwLen
=
sizeof
(
KEY_VALUE_PARTIAL_INFORMATION
)
+
(
result_len
?
*
result_len
:
0
)
;
info
=
(
KEY_VALUE_PARTIAL_INFORMATION
*
)
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
dwLen
);
if
(
!
info
)
...
...
dlls/ntdll/tests/reg.c
View file @
e94df274
...
...
@@ -103,6 +103,7 @@ static NTSTATUS (WINAPI * pRtlUnicodeStringToAnsiString)(PSTRING, PUNICODE_STRIN
static
NTSTATUS
(
WINAPI
*
pRtlFreeHeap
)(
PVOID
,
ULONG
,
PVOID
);
static
NTSTATUS
(
WINAPI
*
pRtlAllocateHeap
)(
PVOID
,
ULONG
,
ULONG
);
static
NTSTATUS
(
WINAPI
*
pRtlZeroMemory
)(
PVOID
,
ULONG
);
static
NTSTATUS
(
WINAPI
*
pRtlpNtQueryValueKey
)(
HANDLE
,
ULONG
*
,
PBYTE
,
DWORD
*
);
static
HMODULE
hntdll
=
0
;
static
int
CurrentTest
=
0
;
...
...
@@ -146,6 +147,7 @@ static BOOL InitFunctionPtrs(void)
NTDLL_GET_PROC
(
RtlFreeHeap
)
NTDLL_GET_PROC
(
RtlAllocateHeap
)
NTDLL_GET_PROC
(
RtlZeroMemory
)
NTDLL_GET_PROC
(
RtlpNtQueryValueKey
)
}
return
TRUE
;
}
...
...
@@ -445,6 +447,14 @@ static void test_NtDeleteKey(void)
ok
(
status
==
STATUS_SUCCESS
,
"NtDeleteKey Failed: 0x%08lx
\n
"
,
status
);
}
static
void
test_RtlpNtQueryValueKey
(
void
)
{
NTSTATUS
status
;
status
=
pRtlpNtQueryValueKey
(
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
status
==
STATUS_INVALID_HANDLE
,
"Expected STATUS_INVALID_HANDLE, got: 0x%08lx
\n
"
,
status
);
}
START_TEST
(
reg
)
{
static
const
WCHAR
winetest
[]
=
{
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
'T'
,
'e'
,
's'
,
't'
,
'\\'
,
0
};
...
...
@@ -463,6 +473,7 @@ START_TEST(reg)
test_RtlCheckRegistryKey
();
test_RtlOpenCurrentUser
();
test_RtlQueryRegistryValues
();
test_RtlpNtQueryValueKey
();
test_NtFlushKey
();
test_NtDeleteKey
();
...
...
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