133965Sjdp/*-
2218822Sdim * Copyright (c) 2006 M. Warner Losh.  All rights reserved.
3218822Sdim *
433965Sjdp * Redistribution and use in source and binary forms, with or without
533965Sjdp * modification, are permitted provided that the following conditions
633965Sjdp * are met:
733965Sjdp * 1. Redistributions of source code must retain the above copyright
833965Sjdp *    notice, this list of conditions and the following disclaimer.
933965Sjdp * 2. Redistributions in binary form must reproduce the above copyright
1033965Sjdp *    notice, this list of conditions and the following disclaimer in the
1133965Sjdp *    documentation and/or other materials provided with the distribution.
1233965Sjdp *
1333965Sjdp * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1433965Sjdp * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1533965Sjdp * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1633965Sjdp * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
1733965Sjdp * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
1833965Sjdp * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19218822Sdim * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20218822Sdim * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2133965Sjdp * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2233965Sjdp * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2333965Sjdp *
2433965Sjdp */
2533965Sjdp
2633965Sjdp#include <sys/cdefs.h>
2733965Sjdp__FBSDID("$FreeBSD$");
2833965Sjdp
2933965Sjdp#include "lib.h"
3033965Sjdp
3138889Sjdpvoid
3233965Sjdpmemcpy(void *dst, const void *src, unsigned len)
3338889Sjdp{
3433965Sjdp    const char *s = src;
3533965Sjdp    char *d = dst;
3638889Sjdp
3733965Sjdp    while (len--)
3833965Sjdp        *d++ = *s++;
3933965Sjdp}
4060484Sobrien