summaryrefslogtreecommitdiff
path: root/magic_buddy/magic_buddy.c
diff options
context:
space:
mode:
authorMatthew Sotoudeh <matthew@masot.net>2024-05-17 13:41:12 -0700
committerMatthew Sotoudeh <matthew@masot.net>2024-05-17 13:41:12 -0700
commitbc4a25899d400ae9bdd52bbc0018792d3a19cca7 (patch)
tree35d4c0e1deeaa2bf1e9b1b17c8a098357ad9954c /magic_buddy/magic_buddy.c
parentea57cdbb470140f680b3fe38b8fb478bae735f8e (diff)
memmove vs memcpy
Diffstat (limited to 'magic_buddy/magic_buddy.c')
-rw-r--r--magic_buddy/magic_buddy.c2
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]);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback