aboutsummaryrefslogtreecommitdiff
path: root/sysutils/apachetop/files
diff options
context:
space:
mode:
authorJun Kuriyama <kuriyama@FreeBSD.org>2004-02-26 23:44:04 +0000
committerJun Kuriyama <kuriyama@FreeBSD.org>2004-02-26 23:44:04 +0000
commit87538eb886ae7b30ed96864013f4be964c35add5 (patch)
tree8e4ee4563dca007f55ba5ee4c91af872ad198293 /sysutils/apachetop/files
parent3c2287b2c5331f2a819c7a3996c8a1a82553958c (diff)
downloadports-87538eb886ae7b30ed96864013f4be964c35add5.tar.gz
ports-87538eb886ae7b30ed96864013f4be964c35add5.zip
Notes
Diffstat (limited to 'sysutils/apachetop/files')
-rw-r--r--sysutils/apachetop/files/patch-display.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/sysutils/apachetop/files/patch-display.cc b/sysutils/apachetop/files/patch-display.cc
new file mode 100644
index 000000000000..7d290b67173c
--- /dev/null
+++ b/sysutils/apachetop/files/patch-display.cc
@@ -0,0 +1,17 @@
+--- src/display.cc.orig Sun Feb 22 22:53:52 2004
++++ src/display.cc Sun Feb 22 22:54:16 2004
+@@ -238,8 +238,12 @@
+ * I'm fairly sure, realistically, it'll never get high enough to be
+ * a problem, so uInt should be ok */
+ if (items) free(items); /* get rid of the last one */
+- items = (struct itemlist *)
+- calloc((unsigned int)items_size, sizeof(itemlist));
++ if (items_size == 0) {
++ items = NULL;
++ } else {
++ items = (struct itemlist *)
++ calloc((unsigned int)items_size, sizeof(itemlist));
++ }
+
+ /* another thread may change the contents of cf while we're running,
+ * and it would be undesirable to have most of this change on us, so