diff options
author | roberto <roberto@FreeBSD.org> | 2004-07-20 15:01:56 +0000 |
---|---|---|
committer | roberto <roberto@FreeBSD.org> | 2004-07-20 15:01:56 +0000 |
commit | 118e757284cbb8fc4f43a713e892b41504b50a5f (patch) | |
tree | 528d12dda44ebdc3ffcc38050f159ac553a69c17 /contrib/ntp/libntp/memmove.c | |
parent | a85d9ae25e8e8696677bc30feb6eaf7fc150e529 (diff) | |
download | FreeBSD-src-118e757284cbb8fc4f43a713e892b41504b50a5f.zip FreeBSD-src-118e757284cbb8fc4f43a713e892b41504b50a5f.tar.gz |
Virgin import of ntpd 4.2.0
Diffstat (limited to 'contrib/ntp/libntp/memmove.c')
-rw-r--r-- | contrib/ntp/libntp/memmove.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/ntp/libntp/memmove.c b/contrib/ntp/libntp/memmove.c index b5d0868..8ccc4b1 100644 --- a/contrib/ntp/libntp/memmove.c +++ b/contrib/ntp/libntp/memmove.c @@ -48,6 +48,8 @@ static char sccsid[] = "@(#)bcopy.c 8.1 (Berkeley) 6/4/93"; #endif #include <string.h> +#include "l_stdlib.h" + /* * sizeof(word) MUST BE A POWER OF TWO * SO THAT wmask BELOW IS ALL ONES @@ -103,7 +105,8 @@ memmove( * Copy whole words, then mop up any trailing bytes. */ t = length / wsize; - TLOOP(*(word *)dst = *(word *)src; src += wsize; dst += wsize); + TLOOP(*(word *)dst = *(const word *)src; src += wsize; + dst += wsize); t = length & wmask; TLOOP(*dst++ = *src++); } else { @@ -124,7 +127,8 @@ memmove( TLOOP1(*--dst = *--src); } t = length / wsize; - TLOOP(src -= wsize; dst -= wsize; *(word *)dst = *(word *)src); + TLOOP(src -= wsize; dst -= wsize; + *(word *)dst = *(const word *)src); t = length & wmask; TLOOP(*--dst = *--src); } |