Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Feb 2018 09:44:23 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r460880 - in head/sysutils/apachetop: . files
Message-ID:  <201802040944.w149iN0Z007768@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Sun Feb  4 09:44:23 2018
New Revision: 460880
URL: https://svnweb.freebsd.org/changeset/ports/460880

Log:
  - Fix some sloppy coding that was upsetting new Clang
  - Switch MASTER_SITES to https:// and add LICENSE
  
  PR:		225649 (modified)
  Submitted by:	maintainer

Added:
  head/sysutils/apachetop/files/patch-src_apachetop.cc   (contents, props changed)
  head/sysutils/apachetop/files/patch-src_display.cc   (contents, props changed)
  head/sysutils/apachetop/files/patch-src_hits__circle.cc   (contents, props changed)
  head/sysutils/apachetop/files/patch-src_log.cc   (contents, props changed)
Modified:
  head/sysutils/apachetop/Makefile

Modified: head/sysutils/apachetop/Makefile
==============================================================================
--- head/sysutils/apachetop/Makefile	Sun Feb  4 09:16:23 2018	(r460879)
+++ head/sysutils/apachetop/Makefile	Sun Feb  4 09:44:23 2018	(r460880)
@@ -5,10 +5,12 @@ PORTNAME=	apachetop
 PORTVERSION=	0.12.6
 PORTREVISION=	5
 CATEGORIES=	sysutils
-MASTER_SITES=	http://lukasz.wasikowski.net/files/
+MASTER_SITES=	https://lukasz.wasikowski.net/files/
 
 MAINTAINER=	lukasz@wasikowski.net
 COMMENT=	Apache RealTime log stats
+
+LICENSE=	BSD3CLAUSE
 
 GNU_CONFIGURE=	yes
 USES=		ncurses readline

Added: head/sysutils/apachetop/files/patch-src_apachetop.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/apachetop/files/patch-src_apachetop.cc	Sun Feb  4 09:44:23 2018	(r460880)
@@ -0,0 +1,20 @@
+--- src/apachetop.cc.orig	2005-10-15 16:23:31 UTC
++++ src/apachetop.cc
+@@ -271,7 +271,7 @@ int main(int argc, char *argv[])
+ 	hm->create(cf.circle_size);
+ 	/* }}} */
+ 
+-	memset(&gstats, (char) NULL, sizeof(gstats));
++	memset(&gstats, 0, sizeof(gstats));
+ 	gstats.start = time(NULL);
+ 
+ 	signal(SIGINT, &catchsig);
+@@ -465,7 +465,7 @@ int main(int argc, char *argv[])
+ 					continue;
+ 				}
+ 
+-				*nextline = (char) NULL;
++				*nextline = '\0';
+ 				++nextline;
+ 
+ 				/* which parser? */

Added: head/sysutils/apachetop/files/patch-src_display.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/apachetop/files/patch-src_display.cc	Sun Feb  4 09:44:23 2018	(r460880)
@@ -0,0 +1,20 @@
+--- src/display.cc.orig	2005-10-15 16:10:01 UTC
++++ src/display.cc
+@@ -1191,7 +1191,7 @@ void display_histogram()
+ 
+ 		/* compose a row of hashes */
+ 		memset(line, ' ', hist_width);
+-		line[hist_width] = (char)NULL;
++		line[hist_width] = '\0';
+ 		for(j = 0 ; j < hist_width ; ++j)
+ 		{
+ 			if (bar_height[j] > y_scale)
+@@ -1203,7 +1203,7 @@ void display_histogram()
+ 	}
+ 
+ 	memset(horiz_line, '-', hist_width);
+-	horiz_line[hist_width] = (char)NULL;
++	horiz_line[hist_width] = '\0';
+ 	mvprintw(HISTOGRAM_START + hist_height, 2, "0+%*s",
+ 	    hist_width, horiz_line);
+ 	

Added: head/sysutils/apachetop/files/patch-src_hits__circle.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/apachetop/files/patch-src_hits__circle.cc	Sun Feb  4 09:44:23 2018	(r460880)
@@ -0,0 +1,11 @@
+--- src/hits_circle.cc.orig	2018-02-04 09:36:17 UTC
++++ src/hits_circle.cc
+@@ -24,7 +24,7 @@ int Hits_Circle::create(unsigned int passed_size)
+ 	}
+ 
+ 	reqcount = bytecount = 0;
+-	memset(rc_summary, (char) NULL, sizeof(rc_summary));
++	memset(rc_summary, 0, sizeof(rc_summary));
+ 
+ 	return 0;
+ }

Added: head/sysutils/apachetop/files/patch-src_log.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/apachetop/files/patch-src_log.cc	Sun Feb  4 09:44:23 2018	(r460880)
@@ -0,0 +1,56 @@
+--- src/log.cc.orig	2018-02-04 09:36:17 UTC
++++ src/log.cc
+@@ -37,7 +37,7 @@ int CommonLogParser::parse(char *logline, struct logbi
+ 	if (!bufcp)
+ 		return -1;
+ 	
+-	*bufcp = (char) NULL;
++	*bufcp = '\0';
+ 	++bufcp;
+ 
+ 	/* quickly figure out if this is an IP or a host. We do this by
+@@ -172,7 +172,7 @@ int CommonLogParser::parse(char *logline, struct logbi
+ 	/* find the end of referrer and null it */
+ 	if (!(bufcp = strchr(bufsp, '"')))
+ 		return -1;
+-	*bufcp = (char) NULL;
++	*bufcp = '\0';
+ 
+ 	/* unless they want to keep it, skip over the protocol, ie http:// */
+ 	if ((cf.preserve_ref_protocol == 0) && (bufcp = strstr(bufsp, "://")))
+@@ -230,7 +230,7 @@ char *LogParser::processURL(char **buf) /* {{{ */
+ 		return NULL;
+ 
+ 	/* null the space in front of it */
+-	*endptr = (char) NULL;
++	*endptr = '\0';
+ 
+ 	/* TODO maybe we can use the protocol someday.. */
+ 
+@@ -258,7 +258,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
+ 	char *bufcp, *endptr, *workptr;
+ 
+ 	endptr = *url + *length;
+-	*endptr = (char) NULL;
++	*endptr = '\0';
+ 
+ 	/* do we want to keep the query string? */
+ 	if (!cf.keep_querystring)
+@@ -273,7 +273,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
+ 			if (workptr < endptr)
+ 			{
+ 				/* we're ok */
+-				*workptr = (char) NULL;
++				*workptr = '\0';
+ 				bufcp = workptr+1;
+ 			}
+ 		}
+@@ -308,7 +308,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
+ 			if (workptr == endptr)
+ 				bufcp = workptr;
+ 		}
+-		*bufcp = (char) NULL;
++		*bufcp = '\0';
+ 	}
+ 
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802040944.w149iN0Z007768>