Module: check_mk
Branch: master
Commit: 9d01b889613d911c18d766bb5736a321d8052750
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9d01b889613d91…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Feb 4 10:14:57 2016 +0100
Made a const_cast explicit. Very dubious...
---
livestatus/src/StringColumnFilter.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/livestatus/src/StringColumnFilter.cc b/livestatus/src/StringColumnFilter.cc
index aac6ae9..0a812c6 100644
--- a/livestatus/src/StringColumnFilter.cc
+++ b/livestatus/src/StringColumnFilter.cc
@@ -101,7 +101,9 @@ bool StringColumnFilter::accepts(void *data) {
void *StringColumnFilter::indexFilter(const char *column) {
if (_opid == OP_EQUAL && (strcmp(column, _column->name()) == 0)) {
- return (void *)_ref_string.c_str();
+ // TODO(sp) The cast looks very dubious, but the whole void* story is
+ // quite dangerous...
+ return const_cast<char *>(_ref_string.c_str());
} else {
return nullptr;
}