summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2009-04-13 17:52:54 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2009-04-13 17:52:54 +0000
commit8784ec5c6f5fd07308e3c6c191fe10fa85cff8bf (patch)
treed80d3c9acc6c0796c544e13c1b3e30729a42942a /devel
parentRestore PORTEPOCH lost in the GNOME 2.26 merge. (diff)
Fix an issue with accessing a bad memory address in my previous patch.
I had the correct code locally, but I committed the bad version. Without this, libgtop would crash. Approved by: portmgr (implicit)
Notes
Notes: svn path=/head/; revision=232318
Diffstat (limited to 'devel')
-rw-r--r--devel/libgtop/Makefile2
-rw-r--r--devel/libgtop/files/patch-sysdeps_freebsd_cpu.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/devel/libgtop/Makefile b/devel/libgtop/Makefile
index 829b0c930f31..a7c29a86ce92 100644
--- a/devel/libgtop/Makefile
+++ b/devel/libgtop/Makefile
@@ -8,7 +8,7 @@
PORTNAME= libgtop
PORTVERSION= 2.26.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome2
diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_cpu.c b/devel/libgtop/files/patch-sysdeps_freebsd_cpu.c
index 1aa7021dbb0b..99a3e8ef8346 100644
--- a/devel/libgtop/files/patch-sysdeps_freebsd_cpu.c
+++ b/devel/libgtop/files/patch-sysdeps_freebsd_cpu.c
@@ -4,7 +4,7 @@
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
{
long cpts [CPUSTATES];
-+ long *cp_times;
++ long *cp_times = NULL;
struct clockinfo ci;
size_t length;
int ncpu, i;
@@ -16,7 +16,7 @@
+ if (sysctlbyname ("kern.cp_times", NULL, &length, NULL, 0) == 0) {
+ cp_times = g_malloc (length);
+ length = sizeof(long) * CPUSTATES * (length / (sizeof(long) * CPUSTATES));
-+ if (sysctlbyname ("kern.cp_times", &cp_times, &length, NULL, 0)) {
++ if (sysctlbyname ("kern.cp_times", cp_times, &length, NULL, 0)) {
+ g_free (cp_times);
+ cp_times = NULL;
+ }