mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[FREELDR] Use RTL copy/zero-memory helper functions.
This commit is contained in:
parent
228eeb7d79
commit
f4fdc957c5
3 changed files with 13 additions and 13 deletions
|
@ -872,7 +872,7 @@ BOOLEAN Ext2ReadPartialBlock(PEXT2_VOLUME_INFO Volume, ULONG BlockNumber, ULONG
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
memcpy(Buffer, ((PUCHAR)TempBuffer + StartingOffset), Length);
|
||||
RtlCopyMemory(Buffer, ((PUCHAR)TempBuffer + StartingOffset), Length);
|
||||
|
||||
FrLdrTempFree(TempBuffer, TAG_EXT_BUFFER);
|
||||
|
||||
|
|
|
@ -519,8 +519,8 @@ BOOLEAN FatSearchDirectoryBufferForFile(PFAT_VOLUME_INFO Volume, PVOID Directory
|
|||
|
||||
TRACE("FatSearchDirectoryBufferForFile() DirectoryBuffer = 0x%x EntryCount = %d FileName = %s\n", DirectoryBuffer, EntryCount, FileName);
|
||||
|
||||
memset(ShortNameBuffer, 0, 13 * sizeof(CHAR));
|
||||
memset(LfnNameBuffer, 0, 261 * sizeof(CHAR));
|
||||
RtlZeroMemory(ShortNameBuffer, 13 * sizeof(CHAR));
|
||||
RtlZeroMemory(LfnNameBuffer, 261 * sizeof(CHAR));
|
||||
|
||||
for (CurrentEntry=0; CurrentEntry<EntryCount; CurrentEntry++, DirectoryBuffer = ((PDIRENTRY)DirectoryBuffer)+1)
|
||||
{
|
||||
|
@ -548,8 +548,8 @@ BOOLEAN FatSearchDirectoryBufferForFile(PFAT_VOLUME_INFO Volume, PVOID Directory
|
|||
//
|
||||
if (DirEntry->FileName[0] == '\xE5')
|
||||
{
|
||||
memset(ShortNameBuffer, 0, 13 * sizeof(CHAR));
|
||||
memset(LfnNameBuffer, 0, 261 * sizeof(CHAR));
|
||||
RtlZeroMemory(ShortNameBuffer, 13 * sizeof(CHAR));
|
||||
RtlZeroMemory(LfnNameBuffer, 261 * sizeof(CHAR));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -642,8 +642,8 @@ BOOLEAN FatSearchDirectoryBufferForFile(PFAT_VOLUME_INFO Volume, PVOID Directory
|
|||
//
|
||||
if (DirEntry->Attr & ATTR_VOLUMENAME)
|
||||
{
|
||||
memset(ShortNameBuffer, 0, 13 * sizeof(UCHAR));
|
||||
memset(LfnNameBuffer, 0, 261 * sizeof(UCHAR));
|
||||
RtlZeroMemory(ShortNameBuffer, 13 * sizeof(UCHAR));
|
||||
RtlZeroMemory(LfnNameBuffer, 261 * sizeof(UCHAR));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -700,8 +700,8 @@ BOOLEAN FatSearchDirectoryBufferForFile(PFAT_VOLUME_INFO Volume, PVOID Directory
|
|||
//
|
||||
// Nope, no match - zero buffers and continue looking
|
||||
//
|
||||
memset(ShortNameBuffer, 0, 13 * sizeof(UCHAR));
|
||||
memset(LfnNameBuffer, 0, 261 * sizeof(UCHAR));
|
||||
RtlZeroMemory(ShortNameBuffer, 13 * sizeof(UCHAR));
|
||||
RtlZeroMemory(LfnNameBuffer, 261 * sizeof(UCHAR));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -783,7 +783,7 @@ ARC_STATUS FatLookupFile(PFAT_VOLUME_INFO Volume, PCSTR FileName, PFAT_FILE_INFO
|
|||
|
||||
TRACE("FatLookupFile() FileName = %s\n", FileName);
|
||||
|
||||
memset(FatFileInfoPointer, 0, sizeof(FAT_FILE_INFO));
|
||||
RtlZeroMemory(FatFileInfoPointer, sizeof(FAT_FILE_INFO));
|
||||
|
||||
//
|
||||
// Figure out how many sub-directories we are nested in
|
||||
|
@ -852,7 +852,7 @@ ARC_STATUS FatLookupFile(PFAT_VOLUME_INFO Volume, PCSTR FileName, PFAT_FILE_INFO
|
|||
}
|
||||
}
|
||||
|
||||
memcpy(FatFileInfoPointer, &FatFileInfo, sizeof(FAT_FILE_INFO));
|
||||
RtlCopyMemory(FatFileInfoPointer, &FatFileInfo, sizeof(FAT_FILE_INFO));
|
||||
|
||||
return ESUCCESS;
|
||||
}
|
||||
|
@ -1178,7 +1178,7 @@ BOOLEAN FatReadPartialCluster(PFAT_VOLUME_INFO Volume, ULONG ClusterNumber, ULON
|
|||
|
||||
if (FatReadVolumeSectors(Volume, ClusterStartSector + SectorOffset, SectorCount, ReadBuffer))
|
||||
{
|
||||
memcpy(Buffer, ReadBuffer + StartingOffset, Length);
|
||||
RtlCopyMemory(Buffer, ReadBuffer + StartingOffset, Length);
|
||||
Success = TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -394,7 +394,7 @@ VOID FsRegisterDevice(CHAR* Prefix, const DEVVTBL* FuncTable)
|
|||
pNewEntry->FuncTable = FuncTable;
|
||||
pNewEntry->ReferenceCount = 0;
|
||||
pNewEntry->Prefix = (CHAR*)(pNewEntry + 1);
|
||||
memcpy(pNewEntry->Prefix, Prefix, Length);
|
||||
RtlCopyMemory(pNewEntry->Prefix, Prefix, Length);
|
||||
|
||||
InsertHeadList(&DeviceListHead, &pNewEntry->ListEntry);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue