Author: mbosma
Date: Fri Mar 2 19:44:19 2007
New Revision: 25949
URL:
http://svn.reactos.org/svn/reactos?rev=25949&view=rev
Log:
Felipe Villarroel (fvillarroels(at)gmail(dot)com):
Changed POSIX-like functions memset and memcpy to native API equivalents.
Modified:
branches/cache_manager_rewrite/cc/copy.c
branches/cache_manager_rewrite/cc/pin.c
branches/cache_manager_rewrite/cc/view.c
Modified: branches/cache_manager_rewrite/cc/copy.c
URL:
http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/cc/copy.c…
==============================================================================
--- branches/cache_manager_rewrite/cc/copy.c (original)
+++ branches/cache_manager_rewrite/cc/copy.c Fri Mar 2 19:44:19 2007
@@ -203,8 +203,9 @@
{
CurrentLength = Length;
}
- memcpy (Buffer,
- (PVOID) ((ULONG_PTR) Bcb->CacheView[Index]->BaseAddress +
Offset.u.LowPart % CACHE_VIEW_SIZE), CurrentLength);
+ RtlCopyMemory(Buffer,
+ (PVOID) ((ULONG_PTR) Bcb->CacheView[Index]->BaseAddress +
Offset.u.LowPart % CACHE_VIEW_SIZE),
+ CurrentLength);
Buffer = (PVOID) ((ULONG_PTR) Buffer + CurrentLength);
Length -= CurrentLength;
Offset.QuadPart += CurrentLength;
@@ -212,7 +213,7 @@
else
{
CurrentLength = Length > CACHE_VIEW_SIZE ? CACHE_VIEW_SIZE : Length;
- memcpy (Buffer, Bcb->CacheView[Index]->BaseAddress, CurrentLength);
+ RtlCopyMemory(Buffer, Bcb->CacheView[Index]->BaseAddress,
CurrentLength);
Buffer = (PVOID) ((ULONG_PTR) Buffer + CurrentLength);
Length -= CurrentLength;
Offset.QuadPart += CurrentLength;
@@ -355,8 +356,8 @@
{
CurrentLength = Length;
}
- memcpy ((PVOID) ((ULONG_PTR) Bcb->CacheView[Index]->BaseAddress +
Offset.u.LowPart % CACHE_VIEW_SIZE),
- Buffer, CurrentLength);
+ RtlCopyMemory((PVOID) ((ULONG_PTR) Bcb->CacheView[Index]->BaseAddress +
Offset.u.LowPart % CACHE_VIEW_SIZE),
+ Buffer, CurrentLength);
Buffer = (PVOID) ((ULONG_PTR) Buffer + CurrentLength);
Length -= CurrentLength;
Offset.QuadPart += CurrentLength;
@@ -364,7 +365,7 @@
else
{
CurrentLength = Length > CACHE_VIEW_SIZE ? CACHE_VIEW_SIZE : Length;
- memcpy (Bcb->CacheView[Index]->BaseAddress, Buffer, CurrentLength);
+ RtlCopyMemory(Bcb->CacheView[Index]->BaseAddress, Buffer,
CurrentLength);
Buffer = (PVOID) ((ULONG_PTR) Buffer + CurrentLength);
Length -= CurrentLength;
Offset.QuadPart += CurrentLength;
@@ -602,15 +603,15 @@
{
CurrentLength = Length;
}
- memset ((PVOID) ((ULONG_PTR) Bcb->CacheView[Index]->BaseAddress +
Offset.u.LowPart % CACHE_VIEW_SIZE), 0,
- CurrentLength);
+ RtlZeroMemory((PVOID) ((ULONG_PTR)
Bcb->CacheView[Index]->BaseAddress + Offset.u.LowPart % CACHE_VIEW_SIZE),
+ CurrentLength);
Length -= CurrentLength;
Offset.QuadPart += CurrentLength;
}
else
{
CurrentLength = Length > CACHE_VIEW_SIZE ? CACHE_VIEW_SIZE : Length;
- memset (Bcb->CacheView[Index]->BaseAddress, 0, CurrentLength);
+ RtlZeroMemory(Bcb->CacheView[Index]->BaseAddress, CurrentLength);
Length -= CurrentLength;
Offset.QuadPart += CurrentLength;
}
Modified: branches/cache_manager_rewrite/cc/pin.c
URL:
http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/cc/pin.c?…
==============================================================================
--- branches/cache_manager_rewrite/cc/pin.c (original)
+++ branches/cache_manager_rewrite/cc/pin.c Fri Mar 2 19:44:19 2007
@@ -152,7 +152,7 @@
{
KEBUGCHECK (0);
}
- memset (iBcb, 0, sizeof (INTERNAL_BCB));
+ RtlZeroMemory(iBcb, sizeof (INTERNAL_BCB));
iBcb->Bcb = Bcb;
iBcb->Index = Index;
Modified: branches/cache_manager_rewrite/cc/view.c
URL:
http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/cc/view.c…
==============================================================================
--- branches/cache_manager_rewrite/cc/view.c (original)
+++ branches/cache_manager_rewrite/cc/view.c Fri Mar 2 19:44:19 2007
@@ -191,7 +191,7 @@
{
KEBUGCHECK (0);
}
- memset (Bcb, 0, sizeof (BCB));
+ RtlZeroMemory(Bcb, sizeof (BCB));
Bcb->FileObject = FileObject;
Bcb->FileSizes = *FileSizes;