summaryrefslogtreecommitdiffstats
path: root/src/lib/cc/data.cc
diff options
context:
space:
mode:
authorMichal 'vorner' Vaner <vorner@vorner.cz>2013-06-17 13:11:50 +0200
committerMichal 'vorner' Vaner <vorner@vorner.cz>2013-06-17 13:11:50 +0200
commitfc951496b21edbdb9c6ac53ab8ed596035177d54 (patch)
treebdec79bbc3c35ef623e85f89bbdac840ff1a622b /src/lib/cc/data.cc
parent[master] ChangeLog for trac2974 (diff)
parent[2726] Remove vertical space (diff)
downloadkea-fc951496b21edbdb9c6ac53ab8ed596035177d54.tar.xz
kea-fc951496b21edbdb9c6ac53ab8ed596035177d54.zip
Merge #2726
Enable more checking in cppcheck and fix the warnings produced by that.
Diffstat (limited to 'src/lib/cc/data.cc')
-rw-r--r--src/lib/cc/data.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/cc/data.cc b/src/lib/cc/data.cc
index ef39753924..9b0ed2120f 100644
--- a/src/lib/cc/data.cc
+++ b/src/lib/cc/data.cc
@@ -693,10 +693,9 @@ NullElement::toJSON(std::ostream& ss) const {
void
StringElement::toJSON(std::ostream& ss) const {
ss << "\"";
- char c;
const std::string& str = stringValue();
for (size_t i = 0; i < str.size(); ++i) {
- c = str[i];
+ const char c = str[i];
// Escape characters as defined in JSON spec
// Note that we do not escape forward slash; this
// is allowed, but not mandatory.