summaryrefslogtreecommitdiffstats
path: root/src/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map.c b/src/map.c
index ad3ed3f..ff18fcf 100644
--- a/src/map.c
+++ b/src/map.c
@@ -801,8 +801,8 @@ map_data_unset_map(struct plugin_state *state,
/* Close the hole in the array. */
domain->n_maps--;
if (i != domain->n_maps) {
- memcpy(&domain->maps[i], &domain->maps[i + 1],
- sizeof(*map) * (domain->n_maps - i));
+ memmove(&domain->maps[i], &domain->maps[i + 1],
+ sizeof(*map) * (domain->n_maps - i));
}
break;
}
@@ -820,10 +820,10 @@ map_data_unset_map(struct plugin_state *state,
/* Fill in the hole in the domains array. */
map_data.n_domains--;
if (i != map_data.n_domains) {
- memcpy(&map_data.domains[i],
- &map_data.domains[i + 1],
- sizeof(*domain) *
- (map_data.n_domains - i));
+ memmove(&map_data.domains[i],
+ &map_data.domains[i + 1],
+ sizeof(*domain) *
+ (map_data.n_domains - i));
}
break;
}