https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b68216e503cc52f81ce9c…
commit b68216e503cc52f81ce9cc641b963f683745e91b
Author: George Bișoc <george.bisoc(a)reactos.org>
AuthorDate: Thu Mar 25 13:05:49 2021 +0100
Commit: George Bișoc <george.bisoc(a)reactos.org>
CommitDate: Tue Apr 27 12:25:03 2021 +0200
[NTOS:SE] Annotate the function parameters of SepRegQueryHelper with SAL
And add a documentation comment header
---
ntoskrnl/se/srm.c | 35 +++++++++++++++++++++++++++++------
1 file changed, 29 insertions(+), 6 deletions(-)
diff --git a/ntoskrnl/se/srm.c b/ntoskrnl/se/srm.c
index 6517d997c1d..468b724f2da 100644
--- a/ntoskrnl/se/srm.c
+++ b/ntoskrnl/se/srm.c
@@ -74,14 +74,38 @@ PSEP_LOGON_SESSION_TERMINATED_NOTIFICATION SepLogonNotifications =
NULL;
/* PRIVATE FUNCTIONS **********************************************************/
+/**
+ * @brief
+ * A private registry helper that returns the desired value
+ * data based on the specifics requested by the caller.
+ *
+ * @param[in] KeyName
+ * Name of the key.
+ *
+ * @param[in] ValueName
+ * Name of the registry value.
+ *
+ * @param[in] ValueType
+ * The type of the registry value.
+ *
+ * @param[in] DataLength
+ * The data length, in bytes, representing the size of the registry value.
+ *
+ * @param[out] ValueData
+ * The requested value data provided by the function.
+ *
+ * @return
+ * Returns STATUS_SUCCESS if the operations have completed successfully,
+ * otherwise a failure NTSTATUS code is returned.
+ */
NTSTATUS
NTAPI
SepRegQueryHelper(
- PCWSTR KeyName,
- PCWSTR ValueName,
- ULONG ValueType,
- ULONG DataLength,
- PVOID ValueData)
+ _In_ PCWSTR KeyName,
+ _In_ PCWSTR ValueName,
+ _In_ ULONG ValueType,
+ _In_ ULONG DataLength,
+ _Out_ PVOID ValueData)
{
UNICODE_STRING ValueNameString;
UNICODE_STRING KeyNameString;
@@ -128,7 +152,6 @@ SepRegQueryHelper(
goto Cleanup;
}
-
if (ValueType == REG_BINARY)
{
RtlCopyMemory(ValueData, KeyValueInformation.Partial.Data, DataLength);