Module: check_mk
Branch: master
Commit: 850a657aba253aa7b6a3f34fe9dd76bd7d9afb09
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=850a657aba253a…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Feb 2 16:36:24 2016 +0100
clang-tidy fixes for google-readability-todo check.
Note that mentioning the user in the TODO doesn't mean that *this* user has
to do the fix, it just means that the given user can be asked about the
background of the TODO etc.
---
livestatus/src/InputBuffer.cc | 2 +-
livestatus/src/LogEntry.cc | 2 +-
livestatus/src/Logfile.cc | 3 ++-
livestatus/src/OutputBuffer.cc | 3 ++-
livestatus/src/Store.cc | 2 +-
livestatus/src/TableStateHistory.cc | 4 ++--
livestatus/src/TableTimeperiods.cc | 2 +-
livestatus/src/pnp4nagios.cc | 2 +-
8 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/livestatus/src/InputBuffer.cc b/livestatus/src/InputBuffer.cc
index dad51ab..2d148c8 100644
--- a/livestatus/src/InputBuffer.cc
+++ b/livestatus/src/InputBuffer.cc
@@ -41,7 +41,7 @@ extern int g_idle_timeout_msec;
namespace {
const size_t initial_buffer_size = 4096;
-// TODO: Make this configurable?
+// TODO(sp): Make this configurable?
const size_t maximum_buffer_size = 500 * 1024 * 1024;
const int read_timeout_usec = 200000;
diff --git a/livestatus/src/LogEntry.cc b/livestatus/src/LogEntry.cc
index 22cfd8a..f5c8385 100644
--- a/livestatus/src/LogEntry.cc
+++ b/livestatus/src/LogEntry.cc
@@ -310,7 +310,7 @@ bool LogEntry::handleExternalCommandEntry() {
_logclass = LOGCLASS_COMMAND;
char *scan = _text;
_text = next_token(&scan, ':');
- return true; // TODO: join with host/service information?
+ return true; // TODO(mk): join with host/service information?
/* Damit wir die restlichen Spalten ordentlich befuellen, braeuchten
wir eine komplette Liste von allen external commands und
deren Parameteraufbau. Oder gibt es hier auch eine bessere
diff --git a/livestatus/src/Logfile.cc b/livestatus/src/Logfile.cc
index 8404734..9d946f5 100644
--- a/livestatus/src/Logfile.cc
+++ b/livestatus/src/Logfile.cc
@@ -46,7 +46,8 @@ using std::make_pair;
extern unsigned long g_max_lines_per_logfile;
-// TODO: We need the suppression pragma below because _readpos and _linebuffer
+// TODO(sp): We need the suppression pragma below because _readpos and
+// _linebuffer
// is not initialized in the constructor. Just replace all this manual fiddling
// with pointers, offsets, etc. with vector.
diff --git a/livestatus/src/OutputBuffer.cc b/livestatus/src/OutputBuffer.cc
index 261e4d1..eb199b1 100644
--- a/livestatus/src/OutputBuffer.cc
+++ b/livestatus/src/OutputBuffer.cc
@@ -72,7 +72,8 @@ void OutputBuffer::addBuffer(const char *buf, unsigned len) {
_writepos += len;
}
-// TODO: All this code is highly error-prone due to overflow, failed allocations
+// TODO(sp): All this code is highly error-prone due to overflow, failed
+// allocations
// etc. We should just use vector instead.
void OutputBuffer::needSpace(unsigned len) {
if (_writepos + len > _end) {
diff --git a/livestatus/src/Store.cc b/livestatus/src/Store.cc
index 94f4b8a..a83b5d6 100644
--- a/livestatus/src/Store.cc
+++ b/livestatus/src/Store.cc
@@ -35,7 +35,7 @@
#include "logger.h"
#include "strutil.h"
-// TODO: Remove this hack.
+// TODO(sp): Remove this hack.
#ifdef EXTERN
#undef EXTERN
#endif
diff --git a/livestatus/src/TableStateHistory.cc b/livestatus/src/TableStateHistory.cc
index 7a2ff98..8ccbff1 100644
--- a/livestatus/src/TableStateHistory.cc
+++ b/livestatus/src/TableStateHistory.cc
@@ -831,8 +831,8 @@ int TableStateHistory::updateHostServiceState(Query *query,
hs_state->_log_output = 0;
else
- // TODO: Do we really need to strdup? How are the lifetimes of entry
- // and hs_state related? This is highly unclear. This strdup
+ // TODO(sp): Do we really need to strdup? How are the lifetimes of
+ // entry and hs_state related? This is highly unclear. This strdup
// complicates things like hell, because HostServiceState owns
// _log_output because of it. If this is really needed (hopefully
// not), we should better change the type from a naked pointer to a
diff --git a/livestatus/src/TableTimeperiods.cc b/livestatus/src/TableTimeperiods.cc
index 58093aa..50fb76e 100644
--- a/livestatus/src/TableTimeperiods.cc
+++ b/livestatus/src/TableTimeperiods.cc
@@ -48,7 +48,7 @@ void TableTimeperiods::addColumns(Table *table, string prefix,
table->addColumn(new OffsetTimeperiodColumn(
prefix + "in", "Wether we are currently in this period
(0/1)", -1,
indirect_offset));
- // TODO: add days and exceptions
+ // TODO(mk): add days and exceptions
}
void TableTimeperiods::answerQuery(Query *query) {
diff --git a/livestatus/src/pnp4nagios.cc b/livestatus/src/pnp4nagios.cc
index 0f3abda..d37aed4 100644
--- a/livestatus/src/pnp4nagios.cc
+++ b/livestatus/src/pnp4nagios.cc
@@ -35,7 +35,7 @@ extern char* g_pnp_path;
namespace {
-// TODO: Move this to some kind of C++ string utility file.
+// TODO(sp): Move this to some kind of C++ string utility file.
string replace_all(const string& str, const string& chars, char replacement) {
string result(str);
size_t i = 0;