Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
09d780b7
Commit
09d780b7
authored
Jul 04, 2012
by
Mukund Sivaraman
Browse files
[2053] Use methods on Name instead of accessing member variables directly
parent
e20691f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/dns/labelsequence.cc
View file @
09d780b7
...
...
@@ -114,11 +114,11 @@ LabelSequence::getHash(bool case_sensitive) const {
std
::
string
LabelSequence
::
toText
(
bool
omit_final_dot
)
const
{
if
(
name_
.
l
ength
_
==
1
)
{
if
(
name_
.
getL
ength
()
==
1
)
{
//
// Special handling for the root label. We ignore omit_final_dot.
//
assert
(
name_
.
l
abel
c
ount
_
==
1
&&
name_
.
ndata_
[
0
]
==
'\0'
);
assert
(
name_
.
getL
abel
C
ount
()
==
1
&&
name_
.
ndata_
[
0
]
==
'\0'
);
return
(
"."
);
}
...
...
@@ -133,7 +133,7 @@ LabelSequence::toText(bool omit_final_dot) const {
// result string: it will roughly have the same length as the wire format
// name data. reserve that length to minimize reallocation.
std
::
string
result
;
result
.
reserve
(
name_
.
l
ength
_
);
result
.
reserve
(
name_
.
getL
ength
()
);
while
(
np
!=
np_end
)
{
labels
--
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment