[Xfce4-commits] [apps/xfce4-taskmanager] 19/20: More cast/type fixes (bug 14401)

noreply at xfce.org noreply at xfce.org
Wed May 30 22:00:33 CEST 2018


This is an automated email from the git hooks/post-receive script.

l   a   n   d   r   y       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-taskmanager.

commit 6cfb7547b0de3cdeffd618b0d804d0a77af3d0aa
Author: rim <rozhuk.im at gmail.com>
Date:   Wed May 30 21:58:08 2018 +0200

    More cast/type fixes (bug 14401)
---
 src/task-manager-freebsd.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/task-manager-freebsd.c b/src/task-manager-freebsd.c
index ac49064..0cce230 100644
--- a/src/task-manager-freebsd.c
+++ b/src/task-manager-freebsd.c
@@ -39,14 +39,14 @@ get_mem_by_bytes (const gchar *name)
 	return buf;
 }
 
-guint64
+static guint64
 get_mem_by_pages (const gchar *name)
 {
 	guint64 res;
 
 	res = get_mem_by_bytes (name);
 	if (res > 0)
-		res *= getpagesize ();
+		res *= (guint64)getpagesize ();
 
 	return res;
 }
@@ -71,8 +71,8 @@ get_memory_usage (guint64 *memory_total, guint64 *memory_free, guint64 *memory_c
 			return FALSE;
 
 		kvm_getswapinfo (kd, &kswap, 1, 0);
-		*swap_total = ((guint64)kswap.ksw_total) * getpagesize ();
-		*swap_free = ((guint64)(kswap.ksw_total - kswap.ksw_used)) * getpagesize ();
+		*swap_total = (guint64)kswap.ksw_total * (guint64)getpagesize ();
+		*swap_free = ((guint64)(kswap.ksw_total - kswap.ksw_used)) * (guint64)getpagesize ();
 
 		kvm_close (kd);
 	}
@@ -129,9 +129,9 @@ get_task_details (struct kinfo_proc *kp, Task *task)
 	task->cpu_user = 100.0f * ((float)kp->ki_pctcpu / FSCALE);
 	task->cpu_system = 0.0f;
 	task->vsz = kp->ki_size;
-	task->rss = kp->ki_rssize * getpagesize ();
+	task->rss = ((guint64)kp->ki_rssize * (guint64)getpagesize ());
 	task->uid = kp->ki_uid;
-	task->prio = (gushort)kp->ki_nice;
+	task->prio = (gshort)kp->ki_nice;
 	g_strlcpy (task->name, kp->ki_comm, sizeof(task->name));
 
 	oid[0] = CTL_KERN;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list