Tidy up PhSetValueKeyZ
@@ -1698,37 +1698,24 @@ NTSTATUS
NTAPI
PhSetValueKeyZ(
_In_ HANDLE KeyHandle,
- _In_opt_ PWSTR ValueName,
+ _In_ PWSTR ValueName,
_In_ ULONG ValueType,
_In_ PVOID Buffer,
_In_ ULONG BufferLength
)
{
- if (ValueName)
- {
- PH_STRINGREF valueNameSr;
+ PH_STRINGREF valueName;
- PhInitializeStringRef(&valueNameSr, ValueName);
+ PhInitializeStringRef(&valueName, ValueName);
return PhSetValueKey(
KeyHandle,
- &valueNameSr,
+ &valueName,
ValueType,
Buffer,
BufferLength
);
}
- else
- {
- return PhSetValueKey(
- KeyHandle,
- NULL,
- ValueType,
- Buffer,
- BufferLength
- );
- }
-}
PHLIBAPI
NTSTATUS
@@ -1750,10 +1737,7 @@ PhDeleteValueKeyZ(
PhInitializeStringRef(&valueName, ValueName);
- return PhDeleteValueKey(
- KeyHandle,
- &valueName
- );
+ return PhDeleteValueKey(KeyHandle, &valueName);
}
typedef BOOLEAN (NTAPI *PPH_ENUM_KEY_CALLBACK)(
