Module: check_mk
Branch: master
Commit: 525394da8dda93c4294c0cae9ddbe7fd84c4035f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=525394da8dda93…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jun 21 16:09:43 2012 +0200
Syntactic code cleanup in Livestatus
---
livestatus/src/InputBuffer.cc | 4 ++--
livestatus/src/OutputBuffer.cc | 4 ++--
livestatus/src/Store.cc | 19 ++++++++++---------
3 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/livestatus/src/InputBuffer.cc b/livestatus/src/InputBuffer.cc
index 746cf9e..841e4fe 100644
--- a/livestatus/src/InputBuffer.cc
+++ b/livestatus/src/InputBuffer.cc
@@ -38,8 +38,8 @@ extern int g_idle_timeout_msec;
bool timeout_reached(const struct timeval *, int);
- InputBuffer::InputBuffer(int *termination_flag)
-: _termination_flag(termination_flag)
+InputBuffer::InputBuffer(int *termination_flag)
+ : _termination_flag(termination_flag)
{
_read_pointer = &_readahead_buffer[0]; // points to data not yet
processed
_write_pointer = _read_pointer; // points to end of data in buffer
diff --git a/livestatus/src/OutputBuffer.cc b/livestatus/src/OutputBuffer.cc
index 841ad81..d94f5c8 100644
--- a/livestatus/src/OutputBuffer.cc
+++ b/livestatus/src/OutputBuffer.cc
@@ -35,8 +35,8 @@
#define WRITE_TIMEOUT_USEC 100000
- OutputBuffer::OutputBuffer()
-: _max_size(INITIAL_OUTPUT_BUFFER_SIZE)
+OutputBuffer::OutputBuffer()
+ : _max_size(INITIAL_OUTPUT_BUFFER_SIZE)
{
_buffer = (char *)malloc(_max_size);
_end = _buffer + _max_size;
diff --git a/livestatus/src/Store.cc b/livestatus/src/Store.cc
index 9c27ced..3594a36 100644
--- a/livestatus/src/Store.cc
+++ b/livestatus/src/Store.cc
@@ -39,14 +39,14 @@ extern int g_debug_level;
extern unsigned long g_max_cached_messages;
Store::Store()
- :_table_hosts(false)
- , _table_hostsbygroup(true)
- , _table_services(false, false)
- , _table_servicesbygroup(true, false)
- , _table_servicesbyhostgroup(false, true)
- , _table_downtimes(true)
- , _table_comments(false)
- , _table_log(g_max_cached_messages)
+ :_table_hosts(false)
+ , _table_hostsbygroup(true)
+ , _table_services(false, false)
+ , _table_servicesbygroup(true, false)
+ , _table_servicesbyhostgroup(false, true)
+ , _table_downtimes(true)
+ , _table_comments(false)
+ , _table_log(g_max_cached_messages)
{
_tables.insert(make_pair("hosts", &_table_hosts));
_tables.insert(make_pair("hostsbygroup", &_table_hostsbygroup));
@@ -115,7 +115,8 @@ bool Store::answerRequest(InputBuffer *input, OutputBuffer *output)
int r = input->readRequest();
if (r != IB_REQUEST_READ) {
if (r != IB_END_OF_FILE)
- output->setError(RESPONSE_CODE_INCOMPLETE_REQUEST, "Client connection
terminated while request still incomplete");
+ output->setError(RESPONSE_CODE_INCOMPLETE_REQUEST,
+ "Client connection terminated while request still
incomplete");
return false;
}
string l = input->nextLine();