diff options
author | Matthew Sotoudeh <matthew@masot.net> | 2024-05-17 13:41:12 -0700 |
---|---|---|
committer | Matthew Sotoudeh <matthew@masot.net> | 2024-05-17 13:41:12 -0700 |
commit | bc4a25899d400ae9bdd52bbc0018792d3a19cca7 (patch) | |
tree | 35d4c0e1deeaa2bf1e9b1b17c8a098357ad9954c | |
parent | ea57cdbb470140f680b3fe38b8fb478bae735f8e (diff) |
memmove vs memcpy
-rw-r--r-- | magic_buddy/magic_buddy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/magic_buddy/magic_buddy.c b/magic_buddy/magic_buddy.c index 3b005d0..e4942ee 100644 --- a/magic_buddy/magic_buddy.c +++ b/magic_buddy/magic_buddy.c @@ -314,7 +314,7 @@ int shrink_buddy(size_t new_size, struct buddy *state) { void move_buddy(struct buddy *new_state, struct buddy *old_state) { if (new_state == old_state) return; - memcpy(new_state, old_state, sizeof(struct buddy)); + memmove(new_state, old_state, sizeof(struct buddy)); for (size_t i = 0; i < ADDRESS_BITS; i++) { if (!new_state->avail[i]) continue; new_state->avail[i]->pprev = &(new_state->avail[i]); |