Skip to content

Commit

Permalink
Fix whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Crunsher committed Feb 12, 2015
1 parent 37b2380 commit 2f6d0cc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/cli/troubleshootcollectcommand.cpp
Expand Up @@ -67,7 +67,7 @@ static void getLatestReport(const String& filename, time_t& bestTimestamp, Strin
#else
struct stat buf;
if (stat(filename.CStr(), &buf))
return;
return;
#endif /*_WIN32*/
if (buf.st_mtime > bestTimestamp) {
bestTimestamp = buf.st_mtime;
Expand Down Expand Up @@ -100,18 +100,18 @@ static void printCrashReports(std::ostream& os)
#else
catch (...) {
throw;
}
}
#endif /*_WIN32*/


if (!bestTimestamp)
os << "\n\tNo crash logs found in " << Application::GetLocalStateDir().CStr() << "/log/icinga2/crash/\n";
else {
const std::tm tm = Utility::LocalTime(bestTimestamp);
char *tmBuf = new char[200]; //Should always be enough
const char *fmt = "%Y-%m-%d %H:%M:%S" ;
if (!strftime(tmBuf, 199, fmt, &tm))
return;
char *tmBuf = new char[200]; //Should always be enough
const char *fmt = "%Y-%m-%d %H:%M:%S" ;
if (!strftime(tmBuf, 199, fmt, &tm))
return;
os << "\n\tLatest crash report is from " << tmBuf
<< "\n\tFile: " << bestFilename << std::endl;
TroubleshootCollectCommand::tail(bestFilename, 20, os);
Expand Down

0 comments on commit 2f6d0cc

Please sign in to comment.