diff options
author | anonimal <anonimal@i2pmail.org> | 2017-06-28 21:07:24 +0000 |
---|---|---|
committer | anonimal <anonimal@i2pmail.org> | 2018-03-18 15:52:19 +0000 |
commit | 84c5a9ba481d7a33cc0fd0ca43867b61d127d907 (patch) | |
tree | f05d3d3f107da02005b4a61f0e5074c113a7165c /external/unbound/compat/memmove.c | |
parent | Merge pull request #3416 (diff) | |
download | monero-84c5a9ba481d7a33cc0fd0ca43867b61d127d907.tar.xz |
Unbound: remove unbound from in-tree source
We'll instead use a git submodule to pull from our unbound repo.
Diffstat (limited to 'external/unbound/compat/memmove.c')
-rw-r--r-- | external/unbound/compat/memmove.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/external/unbound/compat/memmove.c b/external/unbound/compat/memmove.c deleted file mode 100644 index fe319bb49..000000000 --- a/external/unbound/compat/memmove.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * memmove.c: memmove compat implementation. - * - * Copyright (c) 2001-2006, NLnet Labs. All rights reserved. - * - * See LICENSE for the license. -*/ - -#include <config.h> -#include <stdlib.h> - -void *memmove(void *dest, const void *src, size_t n); - -void *memmove(void *dest, const void *src, size_t n) -{ - uint8_t* from = (uint8_t*) src; - uint8_t* to = (uint8_t*) dest; - - if (from == to || n == 0) - return dest; - if (to > from && to-from < (int)n) { - /* to overlaps with from */ - /* <from......> */ - /* <to........> */ - /* copy in reverse, to avoid overwriting from */ - int i; - for(i=n-1; i>=0; i--) - to[i] = from[i]; - return dest; - } - if (from > to && from-to < (int)n) { - /* to overlaps with from */ - /* <from......> */ - /* <to........> */ - /* copy forwards, to avoid overwriting from */ - size_t i; - for(i=0; i<n; i++) - to[i] = from[i]; - return dest; - } - memcpy(dest, src, n); - return dest; -} |