summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-07-08 17:54:41 -0400
committerNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-07-08 17:54:41 -0400
commit91fd14882c2105bc81d66e192582c538452b79fe (patch)
treecc936e045d1ce4f5f70d60605bba6cb74d02510b /src
parenta914f40168fe855186c73758b8fa2f89aac7cd8d (diff)
downloadslapi-nis-91fd14882c2105bc81d66e192582c538452b79fe.tar.gz
slapi-nis-91fd14882c2105bc81d66e192582c538452b79fe.tar.xz
slapi-nis-91fd14882c2105bc81d66e192582c538452b79fe.zip
- correctly fill in the gap in the map list when a map is removed
Diffstat (limited to 'src')
-rw-r--r--src/map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map.c b/src/map.c
index 8f6298f..5c51fae 100644
--- a/src/map.c
+++ b/src/map.c
@@ -678,7 +678,7 @@ map_data_unset_map(struct plugin_state *state,
return;
}
/* Locate the map, remove it from the array of maps. */
- memset(&map, 0, sizeof(map));
+ map = NULL;
for (i = 0; i < domain->n_maps; i++) {
if (strcmp(domain->maps[i].name, map_name) == 0) {
map = &domain->maps[i];
@@ -694,7 +694,7 @@ map_data_unset_map(struct plugin_state *state,
domain->n_maps--;
if (i != domain->n_maps) {
memcpy(&domain->maps[i], &domain->maps[i + 1],
- sizeof(map) * (domain->n_maps - i));
+ sizeof(*map) * (domain->n_maps - i));
}
break;
}