[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 * 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 * 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 * it under the terms of the GNU General Public License as published by
@ -53,13 +53,13 @@ RegImportBinaryHive(
NULL); NULL);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
CmpFree(CmHive, 0); FrLdrTempFree(CmHive, 'eviH');
ERR("Invalid hive Signature!\n"); ERR("Invalid hive Signature!\n");
return FALSE; return FALSE;
} }
/* Save the root key node */ /* Save the root key node */
RootKeyNode = HvGetCell(&CmHive->Hive, Hive->BaseBlock->RootCell); RootKeyNode = HvGetCell(&CmHive->Hive, CmHive->Hive.BaseBlock->RootCell);
TRACE("RegImportBinaryHive done\n"); TRACE("RegImportBinaryHive done\n");
return TRUE; return TRUE;
@ -316,7 +316,6 @@ RegOpenKey(
_Out_ PFRLDRHKEY Key) _Out_ PFRLDRHKEY Key)
{ {
UNICODE_STRING RemainingPath, SubKeyName; UNICODE_STRING RemainingPath, SubKeyName;
UNICODE_STRING RegistryStartPath = RTL_CONSTANT_STRING(L"\\Registry\\MACHINE\\SYSTEM");
UNICODE_STRING CurrentControlSet = RTL_CONSTANT_STRING(L"CurrentControlSet"); UNICODE_STRING CurrentControlSet = RTL_CONSTANT_STRING(L"CurrentControlSet");
PHHIVE Hive = &CmHive->Hive; PHHIVE Hive = &CmHive->Hive;
PCM_KEY_NODE KeyNode; PCM_KEY_NODE KeyNode;

View file

@ -20,6 +20,16 @@
#define strcasecmp _stricmp #define strcasecmp _stricmp
#endif//_WIN32 #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> // Definitions copied from <ntstatus.h>
// We only want to include host headers, so we define them manually // We only want to include host headers, so we define them manually
#define STATUS_SUCCESS ((NTSTATUS)0x00000000) #define STATUS_SUCCESS ((NTSTATUS)0x00000000)
@ -350,7 +360,7 @@ CmCompareKeyValueName(
ULONG ULONG
NTAPI NTAPI
CmCopyKeyName( CmCopyKeyName(
IN PCM_KEY_NODE KeyNode, _In_ PCM_KEY_NODE KeyNode,
_Out_ PWCHAR KeyNameBuffer, _Out_ PWCHAR KeyNameBuffer,
_Inout_ ULONG BufferLength); _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'; Buffer[NameLength / sizeof(WCHAR)] = '\0';
} }
@ -194,7 +194,7 @@ CmCopyPackedName(
ULONG ULONG
NTAPI NTAPI
CmCopyKeyName( CmCopyKeyName(
IN PCM_KEY_NODE KeyNode, _In_ PCM_KEY_NODE KeyNode,
_Out_ PWCHAR KeyNameBuffer, _Out_ PWCHAR KeyNameBuffer,
_Inout_ ULONG BufferLength) _Inout_ ULONG BufferLength)
{ {