Module: check_mk
Branch: master
Commit: 50b8b6b5f477e84680feda3b0df91d50d9fe86d4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=50b8b6b5f477e8…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Feb 4 10:51:28 2016 +0100
Fixed Kung-Fu-style cast.
---
livestatus/src/DownCommColumn.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/livestatus/src/DownCommColumn.cc b/livestatus/src/DownCommColumn.cc
index db0e19c..c13e637 100644
--- a/livestatus/src/DownCommColumn.cc
+++ b/livestatus/src/DownCommColumn.cc
@@ -102,7 +102,8 @@ bool DownCommColumn::isNagiosMember(void *data, void *member) {
TableDownComm *table = _is_downtime ? g_table_downtimes : g_table_comments;
// data points to a host or service
// member is not a pointer, but an unsigned int (hack)
- int64_t id = (int64_t)member; // Hack. Convert it back.
+ unsigned long id = static_cast<unsigned long>(
+ reinterpret_cast<uintptr_t>(member)); // Hack. Convert it back.
DowntimeOrComment *dt = table->findEntry(id, _is_service);
return dt != nullptr && (dt->_service == static_cast<service
*>(data) ||
(dt->_service == nullptr &&