BIND 10 #878: Code to bind to address/port
BIND 10 Development
do-not-reply at isc.org
Fri Jul 1 19:38:33 UTC 2011
#878: Code to bind to address/port
-------------------------------------+-------------------------------------
Reporter: shane | Owner: UnAssigned
Type: | Status: reviewing
enhancement | Milestone: Sprint-
Priority: major | DHCP-20110712
Component: dhcp | Resolution:
Keywords: | Sensitive: 0
Defect Severity: N/A | Sub-Project: DHCP
Feature Depending on Ticket: dhcp- | Estimated Difficulty: 3.0
echo | Total Hours: 0
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by jinmei):
From a quick look, it doesn't follow the coding style guideline very much.
e.g. missing parentheses around 'return', redundant (in terms of the
guideline) space between type and '*' (as in 'int * foo').
To avoid discussing the obvious in the review cycle, I'd suggest
(re)reading the guideline at http://bind10.isc.org/wiki/CodingGuidelines
and fixing them before continuing.
Some other things I happened to notice:
- in general, I'd avoid using C-style casts
- there are some points that perform 'new' and use the result in its
bare form. I've not fully followed the code logic, but in general
it seems dangerous to me. That style of code is often exception
unsafe.
- I suggest gtest code within an unnamed namespace.
- variables/methods of gtest classes should better be 'protected',
than 'public'
- cppcheck complained about a couple of points:
{{{
src/bin/dhcp6/iface_mgr.cc:372: check_fail: The scope of the variable
found_pktinfo can be reduced (information,variableScope)
src/bin/dhcp6/iface_mgr.cc:52: check_fail: Function parameter 'name'
should be passed by reference. (performance,passedByValue)
}}}
(p.s. this is just a quick comments I happen to notice while peeking into
the code out of curiosity. I'm not committed to a full review (yet) :-)
--
Ticket URL: <http://bind10.isc.org/ticket/878#comment:7>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list