code style

This commit is contained in:
john30
2017-01-14 17:58:47 +01:00
parent 0217096b6b
commit 917414a6f8
14 changed files with 40 additions and 37 deletions
+4 -4
View File
@@ -58,12 +58,12 @@ void RotateFile::write(unsigned char* value, unsigned int size, bool received) {
}
if (m_textMode) {
struct timespec ts;
struct tm* tm;
struct tm td;
clockGettime(&ts);
tm = localtime(&ts.tv_sec);
localtime_r(&ts.tv_sec, &td);
fprintf(m_stream, "%04d-%02d-%02d %02d:%02d:%02d.%03ld %c",
tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec, ts.tv_nsec/1000000,
td.tm_year+1900, td.tm_mon+1, td.tm_mday,
td.tm_hour, td.tm_min, td.tm_sec, ts.tv_nsec/1000000,
received ? '<' : '>');
for (unsigned int pos = 0; pos < size; pos++) {
fprintf(m_stream, "%2.2x ", value[pos]);