Commit 308d0c39 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[1596] constify

parent f5ea0617
......@@ -116,8 +116,8 @@ public:
if (args && args->getType() ==
isc::data::Element::map && args->contains("pid")) {
// If it is, we check it is the same as our PID
int pid(args->get("pid")->intValue());
pid_t my_pid(getpid());
const int pid(args->get("pid")->intValue());
const pid_t my_pid(getpid());
if (my_pid != pid) {
// It is not for us
return;
......
......@@ -117,7 +117,7 @@ TEST_F(AuthCommandTest, shutdown) {
TEST_F(AuthCommandTest, shutdownCorrectPID) {
// Put the pid parameter there
pid_t pid(getpid());
const pid_t pid(getpid());
ElementPtr param(new isc::data::MapElement());
param->set("pid", ConstElementPtr(new isc::data::IntElement(pid)));
this->param = param;
......
......@@ -90,8 +90,8 @@ my_command_handler(const string& command, ConstElementPtr args) {
if (args && args->getType() ==
isc::data::Element::map && args->contains("pid")) {
// If it is, we check it is the same as our PID
int pid(args->get("pid")->intValue());
pid_t my_pid(getpid());
const int pid(args->get("pid")->intValue());
const pid_t my_pid(getpid());
if (my_pid != pid) {
// It is not for us
return (answer);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment