BIND 10 trac2665, updated. 50e61198ea74d395b0bc9015c9f01ff29e357e48 [2665] use istream::ignore() (and ignore result) to skip chars instead of get()
BIND 10 source code commits
bind10-changes at lists.isc.org
Sat Feb 9 23:12:10 UTC 2013
The branch, trac2665 has been updated
via 50e61198ea74d395b0bc9015c9f01ff29e357e48 (commit)
via aa5b7e1214e00019776d7bab0cf49df604d2a7e9 (commit)
from a08b7575e7d42740c3f659087420472753bbee16 (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 50e61198ea74d395b0bc9015c9f01ff29e357e48
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Sat Feb 9 14:52:37 2013 -0800
[2665] use istream::ignore() (and ignore result) to skip chars instead of get()
ignoring the result fixes a scan-build error. besides, ignore() should be
more appropriate choice for what it intends to do anyway.
commit aa5b7e1214e00019776d7bab0cf49df604d2a7e9
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Sat Feb 9 14:46:17 2013 -0800
[2665] removed unnecessary assignment, fixing one error from clang scan-build.
-----------------------------------------------------------------------
Summary of changes:
src/lib/cc/data.cc | 10 +++++-----
src/lib/dns/name.cc | 1 -
2 files changed, 5 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/cc/data.cc b/src/lib/cc/data.cc
index f9c23db..af3602a 100644
--- a/src/lib/cc/data.cc
+++ b/src/lib/cc/data.cc
@@ -261,7 +261,7 @@ skipChars(std::istream& in, const char* chars, int& line, int& pos) {
} else {
++pos;
}
- in.get();
+ in.ignore();
c = in.peek();
}
}
@@ -291,7 +291,7 @@ skipTo(std::istream& in, const std::string& file, int& line,
pos = 1;
++line;
}
- in.get();
+ in.ignore();
++pos;
}
in.putback(c);
@@ -352,7 +352,7 @@ strFromStringstream(std::istream& in, const std::string& file,
throwJSONError("Bad escape", file, line, pos);
}
// drop the escaped char
- in.get();
+ in.ignore();
++pos;
}
ss.put(c);
@@ -490,14 +490,14 @@ fromStringstreamMap(std::istream& in, const std::string& file, int& line,
throwJSONError(std::string("Unterminated map, <string> or } expected"), file, line, pos);
} else if (c == '}') {
// empty map, skip closing curly
- c = in.get();
+ in.ignore();
} else {
while (c != EOF && c != '}') {
std::string key = strFromStringstream(in, file, line, pos);
skipTo(in, file, line, pos, ":", WHITESPACE);
// skip the :
- in.get();
+ in.ignore();
pos++;
ConstElementPtr value = Element::fromJSON(in, file, line, pos);
diff --git a/src/lib/dns/name.cc b/src/lib/dns/name.cc
index 079033a..ff00374 100644
--- a/src/lib/dns/name.cc
+++ b/src/lib/dns/name.cc
@@ -227,7 +227,6 @@ stringParse(Iterator s, Iterator send, bool downcase, Offsets& offsets,
isc_throw(BadLabelType,
"invalid label type in " << string(orig_s, send));
}
- state = ft_escape;
// FALLTHROUGH
case ft_escape:
if (!isdigit(c & 0xff)) {
More information about the bind10-changes
mailing list