BIND 10 trac846, updated. 74472396fc8f91daedcd6a286b34b5cae8a5ab57 [trac846] Fix confused test function
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Apr 25 17:39:53 UTC 2011
The branch, trac846 has been updated
via 74472396fc8f91daedcd6a286b34b5cae8a5ab57 (commit)
via e5cae846407b0f627ea67ba687132c141c4de57b (commit)
from c32718be9f5409b6f72d98ddcd0b1ccd4c5c2293 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 74472396fc8f91daedcd6a286b34b5cae8a5ab57
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Mon Apr 25 17:38:39 2011 +0200
[trac846] Fix confused test function
It seemed this function is supposed to remove given element from list,
but the counting was somehow confused.
commit e5cae846407b0f627ea67ba687132c141c4de57b
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Mon Apr 25 17:36:52 2011 +0200
[trac846] Use correct iterator
It used iterator with different comparator. Glibc stl with debug mode
rejected this while trying to compile it.
-----------------------------------------------------------------------
Summary of changes:
src/lib/config/tests/fake_session.cc | 10 ++++++----
src/lib/dns/messagerenderer.cc | 5 +++--
2 files changed, 9 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/config/tests/fake_session.cc b/src/lib/config/tests/fake_session.cc
index 29744c7..c4fa3c4 100644
--- a/src/lib/config/tests/fake_session.cc
+++ b/src/lib/config/tests/fake_session.cc
@@ -52,15 +52,17 @@ listContains(ConstElementPtr list, ConstElementPtr el) {
void
listRemove(ElementPtr list, ConstElementPtr el) {
- int i = -1;
+ int i = 0;
+ int position = -1;
BOOST_FOREACH(ConstElementPtr s_el, list->listValue()) {
if (*el == *s_el) {
- i = 0;
+ position = i;
+ break;
}
i++;
}
- if (i >= 0) {
- list->remove(i);
+ if (position >= 0) {
+ list->remove(position);
}
}
// endwant
diff --git a/src/lib/dns/messagerenderer.cc b/src/lib/dns/messagerenderer.cc
index 6438fb0..767aca9 100644
--- a/src/lib/dns/messagerenderer.cc
+++ b/src/lib/dns/messagerenderer.cc
@@ -228,8 +228,9 @@ MessageRenderer::writeName(const Name& name, const bool compress) {
name.toWire(impl_->nbuffer_);
unsigned int i;
- std::set<NameCompressNode>::const_iterator notfound = impl_->nodeset_.end();
- std::set<NameCompressNode>::const_iterator n = notfound;
+ std::set<NameCompressNode, NameCompare>::const_iterator notfound =
+ impl_->nodeset_.end();
+ std::set<NameCompressNode, NameCompare>::const_iterator n = notfound;
// Find the longest ancestor name in the rendered set that matches the
// given name.
More information about the bind10-changes
mailing list