Module: check_mk
Branch: master
Commit: f013adebbdb67369b7f78adbb54da04a45b25821
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f013adebbdb673…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Jan 21 15:15:04 2016 +0100
Some const-correctness fixes.
---
livestatus/src/InputBuffer.cc | 2 +-
livestatus/src/InputBuffer.h | 4 ++--
livestatus/src/store_c.cc | 2 +-
livestatus/src/store_c.h | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/livestatus/src/InputBuffer.cc b/livestatus/src/InputBuffer.cc
index a79bb95..0290641 100644
--- a/livestatus/src/InputBuffer.cc
+++ b/livestatus/src/InputBuffer.cc
@@ -67,7 +67,7 @@ pair<list<string>, InputBuffer::Result>
failure(InputBuffer::Result r)
// pointers, offsets, etc. with vector.
// cppcheck-suppress uninitMemberVar
-InputBuffer::InputBuffer(int fd, int *termination_flag)
+InputBuffer::InputBuffer(int fd, const int *termination_flag)
: _fd(fd), _termination_flag(termination_flag)
{
_read_index = 0; // points to data not yet processed
diff --git a/livestatus/src/InputBuffer.h b/livestatus/src/InputBuffer.h
index 9a5ffe7..5c0256f 100644
--- a/livestatus/src/InputBuffer.h
+++ b/livestatus/src/InputBuffer.h
@@ -44,14 +44,14 @@ public:
timeout
};
- InputBuffer(int fd, int *termination_flag);
+ InputBuffer(int fd, const int *termination_flag);
std::pair<std::list<std::string>, Result> readRequest();
private:
static const size_t buffer_size = 65536;
int _fd;
- int *_termination_flag;
+ const int *_termination_flag;
char _readahead_buffer[buffer_size];
size_t _read_index;
size_t _write_index;
diff --git a/livestatus/src/store_c.cc b/livestatus/src/store_c.cc
index d952696..7ded0b1 100644
--- a/livestatus/src/store_c.cc
+++ b/livestatus/src/store_c.cc
@@ -103,7 +103,7 @@ void delete_outputbuffer(void *ob)
delete static_cast<OutputBuffer *>(ob);
}
-void *create_inputbuffer(int fd, int *termination_flag)
+void *create_inputbuffer(int fd, const int *termination_flag)
{
return new InputBuffer(fd, termination_flag);
}
diff --git a/livestatus/src/store_c.h b/livestatus/src/store_c.h
index b165011..bfd231e 100644
--- a/livestatus/src/store_c.h
+++ b/livestatus/src/store_c.h
@@ -43,7 +43,7 @@ extern "C"
void *create_outputbuffer();
void flush_output_buffer(void *ob, int fd, int *termination_flag);
void delete_outputbuffer(void *);
- void *create_inputbuffer(int fd, int *termination_flag);
+ void *create_inputbuffer(int fd, const int *termination_flag);
void delete_inputbuffer(void *);
void queue_add_connection(int cc);
int queue_pop_connection();