summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLib/PseudoMemcheck
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-10 16:36:24 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-10 16:36:24 (GMT)
commita16bf141bc5d393b27d13d8235d95a1b034052c2 (patch)
tree59ecd625114f6e98065e7901f418a28fc540cd45 /Tests/CMakeLib/PseudoMemcheck
parentbd9e551c1a13f566e6ffe8cdd1262b7628ed5330 (diff)
downloadCMake-a16bf141bc5d393b27d13d8235d95a1b034052c2.zip
CMake-a16bf141bc5d393b27d13d8235d95a1b034052c2.tar.gz
CMake-a16bf141bc5d393b27d13d8235d95a1b034052c2.tar.bz2
Add missing braces around statements.
Apply fixits of clang-tidy's readability-braces-around-statements checker.
Diffstat (limited to 'Tests/CMakeLib/PseudoMemcheck')
-rw-r--r--Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in12
1 files changed, 7 insertions, 5 deletions
diff --git a/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in b/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in
index 9958021..e2cdec8 100644
--- a/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in
+++ b/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in
@@ -15,15 +15,15 @@ int main(int ac, char** av)
std::string logarg;
bool nextarg = false;
- if (exename.find("valgrind") != exename.npos)
+ if (exename.find("valgrind") != exename.npos) {
logarg = "--log-file=";
- else if (exename.find("purify") != exename.npos)
+ } else if (exename.find("purify") != exename.npos) {
#ifdef _WIN32
logarg = "/SAVETEXTDATA=";
#else
logarg = "-log-file=";
#endif
- else if (exename.find("BC") != exename.npos) {
+ } else if (exename.find("BC") != exename.npos) {
nextarg = true;
logarg = "/X";
}
@@ -34,8 +34,9 @@ int main(int ac, char** av)
std::string arg = argv[i];
if (arg.find(logarg) == 0) {
if (nextarg) {
- if (i == argc - 1)
+ if (i == argc - 1) {
return 1; // invalid command line
+ }
logfile = argv[i + 1];
} else {
logfile = arg.substr(logarg.length());
@@ -44,8 +45,9 @@ int main(int ac, char** av)
}
}
- if (!logfile.empty())
+ if (!logfile.empty()) {
cmSystemTools::Touch(logfile, true);
+ }
}
return RETVAL;