Skip to content
GitLab
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
f15c13fb
Commit
f15c13fb
authored
Feb 14, 2012
by
Michal 'vorner' Vaner
Browse files
[1596] Remove unneeded checks
They'd get caught by an exception anyway.
parent
da724029
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/auth/command.cc
View file @
f15c13fb
...
...
@@ -109,8 +109,7 @@ class ShutdownCommand : public AuthCommand {
public:
virtual
void
exec
(
AuthSrv
&
server
,
isc
::
data
::
ConstElementPtr
args
)
{
// Is the pid argument provided?
if
(
args
&&
args
->
getType
()
==
isc
::
data
::
Element
::
map
&&
args
->
contains
(
"pid"
))
{
if
(
args
&&
args
->
contains
(
"pid"
))
{
// If it is, we check it is the same as our PID
// This might throw in case the type is not an int, but that's
...
...
src/bin/resolver/main.cc
View file @
f15c13fb
...
...
@@ -88,8 +88,7 @@ my_command_handler(const string& command, ConstElementPtr args) {
answer
=
createAnswer
(
0
,
args
);
}
else
if
(
command
==
"shutdown"
)
{
// Is the pid argument provided?
if
(
args
&&
args
->
getType
()
==
isc
::
data
::
Element
::
map
&&
args
->
contains
(
"pid"
))
{
if
(
args
&&
args
->
contains
(
"pid"
))
{
// If it is, we check it is the same as our PID
const
int
pid
(
args
->
get
(
"pid"
)
->
intValue
());
const
pid_t
my_pid
(
getpid
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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