Commit a424f8d0 authored by Dorian Guillois's avatar Dorian Guillois
Browse files

Remove valgrind warning for centreon connector ssh.

parent bfc46a62
......@@ -45,6 +45,11 @@ int main() {
t2 = t1;
// Return check result.
return ((t1.get_check() != &c1)
|| (t2.get_check() != &c1));
int retval ((t1.get_check() != &c1)
|| (t2.get_check() != &c1));
// Unload.
multiplexer::unload();
return (retval);
}
......@@ -45,6 +45,9 @@ int main() {
checks::timeout t2(&c1);
retval |= (t2.get_check() != &c1);
// Unload.
multiplexer::unload();
// Return check result.
return (static_cast<bool>(retval));
}
......@@ -41,6 +41,11 @@ int main() {
checks::timeout t2(t1);
// Return check result.
return ((t1.get_check() != &c1)
|| (t2.get_check() != &c1));
int retval ((t1.get_check() != &c1)
|| (t2.get_check() != &c1));
// Unload.
multiplexer::unload();
return (retval);
}
......@@ -52,6 +52,9 @@ int main() {
t.set_check(&c2);
retval |= (t.get_check() != &c2);
// Unload.
multiplexer::unload();
// Return check result.
return (static_cast<bool>(retval));
}
......@@ -61,8 +61,13 @@ int main() {
p2 = p1;
// Check.
return ((p1.get_buffer() != std::string(DATA1, sizeof(DATA1)))
|| (p1.get_listener() != &fl1)
|| (p2.get_buffer() != std::string(DATA1, sizeof(DATA1)))
|| (p2.get_listener() != &fl1));
int retval ((p1.get_buffer() != std::string(DATA1, sizeof(DATA1)))
|| (p1.get_listener() != &fl1)
|| (p2.get_buffer() != std::string(DATA1, sizeof(DATA1)))
|| (p2.get_listener() != &fl1));
// Unload.
com::centreon::logging::engine::unload();
return (retval);
}
......@@ -55,5 +55,8 @@ int main() {
retval |= (listnr.get_callbacks().begin()->callback
!= fake_listener::cb_eof);
// Unload.
com::centreon::logging::engine::unload();
return (retval);
}
......@@ -52,8 +52,13 @@ int main() {
parser p2(p1);
// Check.
return ((p1.get_buffer() != std::string(DATA, sizeof(DATA)))
|| (p1.get_listener() != &fl)
|| (p2.get_buffer() != std::string(DATA, sizeof(DATA)))
|| (p2.get_listener() != &fl));
int retval ((p1.get_buffer() != std::string(DATA, sizeof(DATA)))
|| (p1.get_listener() != &fl)
|| (p2.get_buffer() != std::string(DATA, sizeof(DATA)))
|| (p2.get_listener() != &fl));
// Unload.
com::centreon::logging::engine::unload();
return (retval);
}
......@@ -38,8 +38,13 @@ int main() {
// Check.
buffer_handle bh;
return (!p.get_buffer().empty()
|| p.get_listener()
|| !p.want_read(bh)
|| p.want_write(bh));
int retval (!p.get_buffer().empty()
|| p.get_listener()
|| !p.want_read(bh)
|| p.want_write(bh));
// Unload.
com::centreon::logging::engine::unload();
return (retval);
}
......@@ -55,5 +55,8 @@ int main() {
retval |= (listnr.get_callbacks().begin()->callback
!= fake_listener::cb_eof);
// Unload.
com::centreon::logging::engine::unload();
return (retval);
}
......@@ -55,5 +55,8 @@ int main() {
retval |= (listnr.get_callbacks().begin()->callback
!= fake_listener::cb_error);
// Unload.
com::centreon::logging::engine::unload();
return (retval);
}
......@@ -104,5 +104,8 @@ int main() {
// Parser must be empty.
retval |= !p.get_buffer().empty();
// Unload.
com::centreon::logging::engine::unload();
return (retval);
}
......@@ -73,5 +73,8 @@ int main() {
// Parser must be empty.
retval |= !p.get_buffer().empty();
// Unload.
com::centreon::logging::engine::unload();
return (retval);
}
......@@ -69,5 +69,8 @@ int main() {
// Parser must be empty.
retval |= !p.get_buffer().empty();
// Unload.
com::centreon::logging::engine::unload();
return (retval);
}
......@@ -69,5 +69,8 @@ int main() {
// Parser must be empty.
retval |= !p.get_buffer().empty();
// Unload.
com::centreon::logging::engine::unload();
return (retval);
}
......@@ -95,5 +95,8 @@ int main() {
// Parser must be empty.
retval |= !p.get_buffer().empty();
// Unload.
com::centreon::logging::engine::unload();
return (retval);
}
......@@ -65,5 +65,8 @@ int main() {
// Parser must be empty.
retval |= !p.get_buffer().empty();
// Unload.
com::centreon::logging::engine::unload();
return (retval);
}
......@@ -65,5 +65,8 @@ int main() {
// Parser must be empty.
retval |= !p.get_buffer().empty();
// Unload.
com::centreon::logging::engine::unload();
return (retval);
}
......@@ -119,6 +119,11 @@ int main() {
}
// Compare parsed result with expected result.
return ((expected != listnr.get_callbacks())
|| (!p.get_buffer().empty()));
int retval((expected != listnr.get_callbacks())
|| (!p.get_buffer().empty()));
// Unload.
com::centreon::logging::engine::unload();
return (retval);
}
......@@ -65,5 +65,8 @@ int main() {
// Parser must be empty.
retval |= !p.get_buffer().empty();
// Unload.
com::centreon::logging::engine::unload();
return (retval);
}
......@@ -32,9 +32,17 @@ int main() {
// Initialization.
com::centreon::logging::engine::load();
// Object.
reporter r;
int retval;
{
// Object.
reporter r;
// Check.
return (!r.can_report() || !r.get_buffer().empty());
// Check.
retval = (!r.can_report() || !r.get_buffer().empty());
}
// Unload.
com::centreon::logging::engine::unload();
return (retval);
}
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