[gnome-system-monitor] Fix bytes to bits conversion.



commit 80f060ac22d17807d82556a6977038139fa00b55
Author: Benoît Dejean <bdejean gmail com>
Date:   Sat Apr 7 20:10:55 2018 +0200

    Fix bytes to bits conversion.
    
    Patch by atkinson tommy nsoft com
    https://bugzilla.gnome.org/show_bug.cgi?id=795051

 src/util.cpp |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/util.cpp b/src/util.cpp
index 6c2e188..8efebf3 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -147,6 +147,9 @@ procman_make_label_for_mmaps_or_ofiles(const char *format,
 gchar*
 procman::format_size(guint64 size, bool want_bits)
 {
+    if (want_bits)
+        size *= 8;
+
     const GFormatSizeFlags flags = (want_bits ? G_FORMAT_SIZE_BITS : G_FORMAT_SIZE_IEC_UNITS);
     return g_format_size_full(size, flags);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]