diff options
Diffstat (limited to 'zap/source/any/mem/cp.c')
-rw-r--r-- | zap/source/any/mem/cp.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/zap/source/any/mem/cp.c b/zap/source/any/mem/cp.c index 2c1b265..9752721 100644 --- a/zap/source/any/mem/cp.c +++ b/zap/source/any/mem/cp.c @@ -6,11 +6,9 @@ #include <zap/mem.h> -void zap_cp(void * const zap_priv_restr _dest,void const * const zap_priv_restr _src,zap_sz const _num) { - zap_i8 * dest; - zap_i8 const * src; - zap_i8 * const stop = (zap_i8 *)_dest + _num; - for (dest = _dest,src = _src;dest != stop;++dest,++src) { - *dest = *src; - } +void zap_cp(void * const zap_priv_restr voiddest,void const * const zap_priv_restr voidsrc,zap_sz const num) { + unsigned char * dest = voiddest; + unsigned char const * src = voidsrc; + unsigned char * const stop = dest + num; + while (dest != stop) *dest++ = *src++; } |