Quantcast

Valgrind: r16379 - in /trunk: coregrind/m_gdbserver/server.c lackey/lk_main.c

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Valgrind: r16379 - in /trunk: coregrind/m_gdbserver/server.c lackey/lk_main.c

svn-2
Author: philippe
Date: Mon May 15 22:00:16 2017
New Revision: 16379

Log:
Fix 2 errors found by PVS studio
(see  https://www.viva64.com/en/b/0504/ and bug 379502)


Modified:
    trunk/coregrind/m_gdbserver/server.c
    trunk/lackey/lk_main.c

Modified: trunk/coregrind/m_gdbserver/server.c
==============================================================================
--- trunk/coregrind/m_gdbserver/server.c (original)
+++ trunk/coregrind/m_gdbserver/server.c Mon May 15 22:00:16 2017
@@ -107,7 +107,7 @@
        && 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));
    }
 }
 

Modified: trunk/lackey/lk_main.c
==============================================================================
--- trunk/lackey/lk_main.c (original)
+++ trunk/lackey/lk_main.c Mon May 15 22:00:16 2017
@@ -1011,7 +1011,7 @@
       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");


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers
Loading...