Skip to content
GitLab
Menu
Projects
Groups
Snippets
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
0596cd9d
Commit
0596cd9d
authored
Aug 13, 2012
by
JINMEI Tatuya
Browse files
[2097] cleanup: add trailing _ to private member variables.
this will help prevent accidental direct misuse of these variables
parent
879a7359
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/datasrc/memory/rdataset.cc
View file @
0596cd9d
...
...
@@ -135,7 +135,7 @@ RdataSet::destroy(util::MemorySegment& mem_sgmt, RRClass rrclass,
rdataset
->
getRdataCount
(),
rdataset
->
getSigRdataCount
()).
getSize
();
const
size_t
ext_rrsig_count_len
=
rdataset
->
sig_rdata_count
>=
MANY_RRSIG_COUNT
?
sizeof
(
uint16_t
)
:
0
;
rdataset
->
sig_rdata_count
_
>=
MANY_RRSIG_COUNT
?
sizeof
(
uint16_t
)
:
0
;
rdataset
->~
RdataSet
();
mem_sgmt
.
deallocate
(
rdataset
,
sizeof
(
RdataSet
)
+
ext_rrsig_count_len
+
data_len
);
...
...
@@ -159,12 +159,12 @@ convertTTL(RRTTL ttl) {
}
}
RdataSet
::
RdataSet
(
RRType
type_param
,
size_t
rdata_count
_param
,
size_t
sig_rdata_count
_param
,
RRTTL
ttl
_param
)
:
RdataSet
::
RdataSet
(
RRType
type_param
,
size_t
rdata_count
,
size_t
sig_rdata_count
,
RRTTL
ttl
)
:
type
(
type_param
),
sig_rdata_count
(
sig_rdata_count
_param
>=
MANY_RRSIG_COUNT
?
MANY_RRSIG_COUNT
:
sig_rdata_count
_param
),
rdata_count
(
rdata_count
_param
),
ttl
(
convertTTL
(
ttl
_param
))
sig_rdata_count
_
(
sig_rdata_count
>=
MANY_RRSIG_COUNT
?
MANY_RRSIG_COUNT
:
sig_rdata_count
),
rdata_count
_
(
rdata_count
),
ttl
_
(
convertTTL
(
ttl
))
{
// Make sure an RRType object is essentially a plain 16-bit value, so
// our assumption of the size of RdataSet holds. If it's not the case
...
...
src/lib/datasrc/memory/rdataset.h
View file @
0596cd9d
...
...
@@ -60,25 +60,25 @@ public:
RdataSetPtr
next
;
const
dns
::
RRType
type
;
private:
const
uint16_t
sig_rdata_count
:
3
;
const
uint16_t
rdata_count
:
13
;
const
uint32_t
ttl
;
///< TTL of the RdataSet, net byte order
const
uint16_t
sig_rdata_count
_
:
3
;
const
uint16_t
rdata_count
_
:
13
;
const
uint32_t
ttl
_
;
///< TTL of the RdataSet, net byte order
static
const
size_t
MAX_RDATA_COUNT
=
(
1
<<
13
)
-
1
;
static
const
size_t
MAX_RRSIG_COUNT
=
(
1
<<
16
)
-
1
;
static
const
size_t
MANY_RRSIG_COUNT
=
(
1
<<
3
)
-
1
;
public:
size_t
getRdataCount
()
const
{
return
(
rdata_count
);
}
size_t
getRdataCount
()
const
{
return
(
rdata_count
_
);
}
size_t
getSigRdataCount
()
const
{
if
(
sig_rdata_count
<
MANY_RRSIG_COUNT
)
{
return
(
sig_rdata_count
);
if
(
sig_rdata_count
_
<
MANY_RRSIG_COUNT
)
{
return
(
sig_rdata_count
_
);
}
else
{
return
(
*
getExtSIGCountBuf
());
}
}
const
void
*
getTTLData
()
const
{
return
(
&
ttl
);
}
const
void
*
getTTLData
()
const
{
return
(
&
ttl
_
);
}
void
*
getDataBuf
()
{
if
(
sig_rdata_count
<
MANY_RRSIG_COUNT
)
{
if
(
sig_rdata_count
_
<
MANY_RRSIG_COUNT
)
{
return
(
this
+
1
);
}
else
{
return
(
getExtSIGCountBuf
()
+
1
);
...
...
Write
Preview
Supports
Markdown
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