diff --git a/reactos/ntoskrnl/rtl/mem.c b/reactos/ntoskrnl/rtl/mem.c index 986c48bf41b..d62d069c2f4 100644 --- a/reactos/ntoskrnl/rtl/mem.c +++ b/reactos/ntoskrnl/rtl/mem.c @@ -1,4 +1,4 @@ -/* $Id: mem.c,v 1.6 1999/11/09 18:03:39 ekohl Exp $ +/* $Id: mem.c,v 1.7 1999/12/01 15:22:49 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -22,7 +22,11 @@ ULONG STDCALL -RtlCompareMemory(PVOID Source1, PVOID Source2, ULONG Length) +RtlCompareMemory ( + PVOID Source1, + PVOID Source2, + ULONG Length + ) /* * FUNCTION: Compares blocks of memory and returns the number of equal bytes * ARGUMENTS: @@ -33,7 +37,7 @@ RtlCompareMemory(PVOID Source1, PVOID Source2, ULONG Length) */ { int i,total; - + for (i=0,total=0;i 0) - { - *Dest = Fill; - Dest++; - Count--; - } -} - - -VOID -STDCALL -RtlZeroMemory ( PVOID Destination, - ULONG Length + ULONG Length, + ULONG Fill ) { - RtlFillMemory ( - Destination, - Length, - 0 - ); + PULONG Dest = Destination; + ULONG Count = Length / sizeof(ULONG); + + while (Count > 0) + { + *Dest = Fill; + Dest++; + Count--; + } } @@ -123,4 +146,18 @@ RtlMoveMemory ( } +VOID +STDCALL +RtlZeroMemory ( + PVOID Destination, + ULONG Length + ) +{ + RtlFillMemory ( + Destination, + Length, + 0 + ); +} + /* EOF */