diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-12-19 12:23:22 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-01-02 08:16:50 +1100 |
commit | 809bcfca3d835458010013c0454b16d7f2a9fdf3 (patch) | |
tree | 1c2ff34e4a59bde7e48605417980e393db6b96b5 /source4 | |
parent | 4dbcab45f263e3ccce1d10d20226d7c3c68cdc9a (diff) | |
download | samba-809bcfca3d835458010013c0454b16d7f2a9fdf3.tar.gz samba-809bcfca3d835458010013c0454b16d7f2a9fdf3.tar.bz2 samba-809bcfca3d835458010013c0454b16d7f2a9fdf3.zip |
s4-dsdb: minor cleanup in DRS replicated objects code
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index 95e51d1d8b..3e6455c089 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -2378,14 +2378,15 @@ static int replmd_replicated_apply_add(struct replmd_replicated_request *ar) /* remove any message elements that have zero values */ for (i=0; i<msg->num_elements; i++) { - if (msg->elements[i].num_values == 0) { + struct ldb_message_element *el = &msg->elements[i]; + + if (el->num_values == 0) { DEBUG(4,(__location__ ": Removing attribute %s with num_values==0\n", - msg->elements[i].name)); - memmove(&msg->elements[i], - &msg->elements[i+1], - sizeof(msg->elements[i])*(msg->num_elements - (i+1))); + el->name)); + memmove(el, el+1, sizeof(*el)*(msg->num_elements - (i+1))); msg->num_elements--; i--; + continue; } } |