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

[1596] constify

parent f5ea0617
...@@ -116,8 +116,8 @@ public: ...@@ -116,8 +116,8 @@ public:
if (args && args->getType() == if (args && args->getType() ==
isc::data::Element::map && args->contains("pid")) { isc::data::Element::map && args->contains("pid")) {
// If it is, we check it is the same as our PID // If it is, we check it is the same as our PID
int pid(args->get("pid")->intValue()); const int pid(args->get("pid")->intValue());
pid_t my_pid(getpid()); const pid_t my_pid(getpid());
if (my_pid != pid) { if (my_pid != pid) {
// It is not for us // It is not for us
return; return;
......
...@@ -117,7 +117,7 @@ TEST_F(AuthCommandTest, shutdown) { ...@@ -117,7 +117,7 @@ TEST_F(AuthCommandTest, shutdown) {
TEST_F(AuthCommandTest, shutdownCorrectPID) { TEST_F(AuthCommandTest, shutdownCorrectPID) {
// Put the pid parameter there // Put the pid parameter there
pid_t pid(getpid()); const pid_t pid(getpid());
ElementPtr param(new isc::data::MapElement()); ElementPtr param(new isc::data::MapElement());
param->set("pid", ConstElementPtr(new isc::data::IntElement(pid))); param->set("pid", ConstElementPtr(new isc::data::IntElement(pid)));
this->param = param; this->param = param;
......
...@@ -90,8 +90,8 @@ my_command_handler(const string& command, ConstElementPtr args) { ...@@ -90,8 +90,8 @@ my_command_handler(const string& command, ConstElementPtr args) {
if (args && args->getType() == if (args && args->getType() ==
isc::data::Element::map && args->contains("pid")) { isc::data::Element::map && args->contains("pid")) {
// If it is, we check it is the same as our PID // If it is, we check it is the same as our PID
int pid(args->get("pid")->intValue()); const int pid(args->get("pid")->intValue());
pid_t my_pid(getpid()); const pid_t my_pid(getpid());
if (my_pid != pid) { if (my_pid != pid) {
// It is not for us // It is not for us
return (answer); return (answer);
......
Supports Markdown
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