[FREELDR/CMLIB]

Update Copyright year and fix GCC build

svn path=/trunk/; revision=61596
This commit is contained in:
Timo Kreuzer 2014-01-12 21:55:20 +00:00
parent 43e433ed3f
commit 9f1bf9ce45
3 changed files with 16 additions and 7 deletions

View file

@ -1,7 +1,7 @@
/*
* FreeLoader
*
* Copyright (C) 2001, 2002 Timo Kreuzer <timo.kreuzer@reactos.org>
* Copyright (C) 2014 Timo Kreuzer <timo.kreuzer@reactos.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -53,13 +53,13 @@ RegImportBinaryHive(
NULL);
if (!NT_SUCCESS(Status))
{
CmpFree(CmHive, 0);
FrLdrTempFree(CmHive, 'eviH');
ERR("Invalid hive Signature!\n");
return FALSE;
}
/* Save the root key node */
RootKeyNode = HvGetCell(&CmHive->Hive, Hive->BaseBlock->RootCell);
RootKeyNode = HvGetCell(&CmHive->Hive, CmHive->Hive.BaseBlock->RootCell);
TRACE("RegImportBinaryHive done\n");
return TRUE;
@ -316,7 +316,6 @@ RegOpenKey(
_Out_ PFRLDRHKEY Key)
{
UNICODE_STRING RemainingPath, SubKeyName;
UNICODE_STRING RegistryStartPath = RTL_CONSTANT_STRING(L"\\Registry\\MACHINE\\SYSTEM");
UNICODE_STRING CurrentControlSet = RTL_CONSTANT_STRING(L"CurrentControlSet");
PHHIVE Hive = &CmHive->Hive;
PCM_KEY_NODE KeyNode;

View file

@ -20,6 +20,16 @@
#define strcasecmp _stricmp
#endif//_WIN32
#ifndef _MSC_VER
#define _In_
#define _Out_
#define _Inout_
#endif
#ifndef min
#define min(a, b) (((a) < (b)) ? (a) : (b))
#endif
// Definitions copied from <ntstatus.h>
// We only want to include host headers, so we define them manually
#define STATUS_SUCCESS ((NTSTATUS)0x00000000)
@ -350,7 +360,7 @@ CmCompareKeyValueName(
ULONG
NTAPI
CmCopyKeyName(
IN PCM_KEY_NODE KeyNode,
_In_ PCM_KEY_NODE KeyNode,
_Out_ PWCHAR KeyNameBuffer,
_Inout_ ULONG BufferLength);

View file

@ -183,7 +183,7 @@ CmCopyPackedName(
}
}
if (BufferLength >= NameLength + sizeof(UNICODE_NULL))
if (BufferLength >= NameLength + sizeof(WCHAR))
{
Buffer[NameLength / sizeof(WCHAR)] = '\0';
}
@ -194,7 +194,7 @@ CmCopyPackedName(
ULONG
NTAPI
CmCopyKeyName(
IN PCM_KEY_NODE KeyNode,
_In_ PCM_KEY_NODE KeyNode,
_Out_ PWCHAR KeyNameBuffer,
_Inout_ ULONG BufferLength)
{