Re: Implementing my own memcpy
- From: Robert W Hand <rwhand@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 25 Jun 2005 13:33:47 -0400
On Sun, 26 Jun 2005 01:07:00 +1000, Netocrat <netocrat@xxxxxxxxxxx>
wrote:
>On Sat, 25 Jun 2005 07:28:30 -0700, Rajan wrote:
(...)
>#include <stddef.h>
>
>void *mem_cpy(void *dest, const void *src, size_t bytes)
>{
> unsigned char *srcmax = dest + bytes;
>
> while (src < srcmax)
I don't understand this line. You are comparing one array src to
another srcmax. Perhaps I missed something, but I do not believe that
they are looking into the same array. Did you mean to define srcmax
differently?
unsigned char* srcmax = src + bytes;
--
Best wishes,
Bob
.
- Follow-Ups:
- Re: Implementing my own memcpy
- From: Netocrat
- Re: Implementing my own memcpy
- References:
- Implementing my own memcpy
- From: Rajan
- Re: Implementing my own memcpy
- From: Netocrat
- Implementing my own memcpy
- Prev by Date: Re: C software achitecture
- Next by Date: Re: Data Structure
- Previous by thread: Re: Implementing my own memcpy
- Next by thread: Re: Implementing my own memcpy
- Index(es):