diff --git a/coregrind/m_gdbserver/server.c b/coregrind/m_gdbserver/server.c index 2f26178e7..1f3d13dfd 100644 --- a/coregrind/m_gdbserver/server.c +++ b/coregrind/m_gdbserver/server.c @@ -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)); } } diff --git a/lackey/lk_main.c b/lackey/lk_main.c index 12b0034eb..707ba9722 100644 --- a/lackey/lk_main.c +++ b/lackey/lk_main.c @@ -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");