Date: Mon, 20 Feb 2017 22:59:38 +0000 (UTC) From: Olivier Duchateau <olivierd@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r434491 - head/x11/xfce4-taskmanager/files Message-ID: <201702202259.v1KMxcO6029941@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: olivierd Date: Mon Feb 20 22:59:38 2017 New Revision: 434491 URL: https://svnweb.freebsd.org/changeset/ports/434491 Log: Fix patch (it was malformed in revision r434478) Modified: head/x11/xfce4-taskmanager/files/patch-src__task-manager-freebsd.c Modified: head/x11/xfce4-taskmanager/files/patch-src__task-manager-freebsd.c ============================================================================== --- head/x11/xfce4-taskmanager/files/patch-src__task-manager-freebsd.c Mon Feb 20 21:21:20 2017 (r434490) +++ head/x11/xfce4-taskmanager/files/patch-src__task-manager-freebsd.c Mon Feb 20 22:59:38 2017 (r434491) @@ -1,49 +1,46 @@ ---- patch-src_task-manager-freebsd.c.orig 2017-02-20 17:11:50 UTC -+++ patch-src_task-manager-freebsd.c -@@ -0,0 +1,46 @@ -+--- src/task-manager-freebsd.c.orig 2017-01-23 06:53:01 UTC -++++ src/task-manager-freebsd.c -+@@ -26,11 +26,11 @@ -+ -+ #include "task-manager.h" -+ -+-gulong -++guint64 -+ get_mem_by_bytes (const gchar *name) -+ { -+- gulong buf; -+- gsize len = sizeof (gulong); -++ guint64 buf = 0; -++ gsize len = sizeof (buf); -+ -+ if (sysctlbyname (name, &buf, &len, NULL, 0) < 0) -+ return 0; -+@@ -41,13 +41,13 @@ get_mem_by_bytes (const gchar *name) -+ guint64 -+ get_mem_by_pages (const gchar *name) -+ { -+- gulong res; -++ guint64 res; -+ -+ res = get_mem_by_bytes (name); -+ if (res > 0) -+ res = res * getpagesize (); -+ -+- return (guint64) res; -++ return res; -+ } -+ -+ gboolean -+@@ -55,10 +55,10 @@ get_memory_usage (guint64 *memory_total, -+ { -+ /* Get memory usage */ -+ { -+- *memory_total = (guint64) get_mem_by_bytes ("hw.physmem");; -++ *memory_total = get_mem_by_bytes ("hw.physmem");; -+ *memory_free = get_mem_by_pages ("vm.stats.vm.v_free_count"); -+ *memory_cache = get_mem_by_pages ("vm.stats.vm.v_inactive_count"); -+- *memory_buffers = (guint64) get_mem_by_bytes ("vfs.bufspace"); -++ *memory_buffers = get_mem_by_bytes ("vfs.bufspace"); -+ } -+ -+ /* Get swap usage */ +--- src/task-manager-freebsd.c.orig 2017-01-23 06:53:01 UTC ++++ src/task-manager-freebsd.c +@@ -26,11 +26,11 @@ + + #include "task-manager.h" + +-gulong ++guint64 + get_mem_by_bytes (const gchar *name) + { +- gulong buf; +- gsize len = sizeof (gulong); ++ guint64 buf = 0; ++ gsize len = sizeof (buf); + + if (sysctlbyname (name, &buf, &len, NULL, 0) < 0) + return 0; +@@ -41,13 +41,13 @@ get_mem_by_bytes (const gchar *name) + guint64 + get_mem_by_pages (const gchar *name) + { +- gulong res; ++ guint64 res; + + res = get_mem_by_bytes (name); + if (res > 0) + res = res * getpagesize (); + +- return (guint64) res; ++ return res; + } + + gboolean +@@ -55,10 +55,10 @@ get_memory_usage (guint64 *memory_total, + { + /* Get memory usage */ + { +- *memory_total = (guint64) get_mem_by_bytes ("hw.physmem");; ++ *memory_total = get_mem_by_bytes ("hw.physmem");; + *memory_free = get_mem_by_pages ("vm.stats.vm.v_free_count"); + *memory_cache = get_mem_by_pages ("vm.stats.vm.v_inactive_count"); +- *memory_buffers = (guint64) get_mem_by_bytes ("vfs.bufspace"); ++ *memory_buffers = get_mem_by_bytes ("vfs.bufspace"); + } + + /* Get swap usage */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702202259.v1KMxcO6029941>