Skip to content

Commit

Permalink
eliminate buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Mar 19, 2024
1 parent 819dd31 commit 1216a3f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Source/driver/Castro_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,8 @@ Castro::writeJobInfo (const std::string& dir, const Real io_time)
jobInfoFile << PrettyLine;

const std::time_t now = time(nullptr);
char buf[64];
if (strftime(buf, sizeof buf, "%c\n", std::localtime(&now))) {
jobInfoFile << "output date / time: " << buf << "\n";
}
jobInfoFile << "output date / time: "
<< std::put_time(std::localtime(&now), "%c\n") << "\n";

char currentDir[FILENAME_MAX];
if (getcwd(currentDir, FILENAME_MAX) != nullptr) {
Expand Down

0 comments on commit 1216a3f

Please sign in to comment.