Fix 2 errors found by PVS studio

(see  https://www.viva64.com/en/b/0504/ and bug 379502)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16379
This commit is contained in:
Philippe Waroquiers 2017-05-15 21:00:16 +00:00
parent 81ba51146e
commit 54e6c1e1fd
2 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ void reset_valgrind_sink(const char *info)
&& initial_valgrind_sink_saved) {
VG_(log_output_sink).fd = initial_valgrind_sink.fd;
VG_(umsg) ("Reset valgrind output to log (%s)\n",
(info = NULL ? "" : info));
(info == NULL ? "" : info));
}
}

View File

@ -1011,7 +1011,7 @@ static void lk_fini(Int exitcode)
VG_(umsg)("Jccs:\n");
VG_(umsg)(" total: %'llu\n", total_Jccs);
VG_(umsg)(" taken: %'llu (%.0f%%)\n",
taken_Jccs, taken_Jccs * 100.0 / total_Jccs ?: 1);
taken_Jccs, taken_Jccs * 100.0 / (total_Jccs ? total_Jccs : 1));
VG_(umsg)("\n");
VG_(umsg)("Executed:\n");