From owner-svn-ports-head@freebsd.org Mon Oct 9 17:08:02 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 006E7E36AFF; Mon, 9 Oct 2017 17:08:02 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BBE816FE63; Mon, 9 Oct 2017 17:08:01 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 6B45F1A7F8; Mon, 9 Oct 2017 17:07:19 +0000 (UTC) Date: Mon, 9 Oct 2017 17:07:19 +0000 From: Alexey Dokuchaev To: Cy Schubert Cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r451623 - in head/net/tcpview: . files Message-ID: <20171009170719.GA89682@FreeBSD.org> References: <201710091658.v99GwjlO076327@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201710091658.v99GwjlO076327@repo.freebsd.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Oct 2017 17:08:02 -0000 On Mon, Oct 09, 2017 at 04:58:45PM +0000, Cy Schubert wrote: > New Revision: 451623 > URL: https://svnweb.freebsd.org/changeset/ports/451623 > > Log: > Use fgets() instead of gets(). > > The approach I used was to create a "poor man's" gets macro as an example. > Though not the same as gets() it approximates gets() well enough. We might > want to consider this approach in base. I don't think I understand this comment, really. > Added: head/net/tcpview/files/patch-hex.c > @@ -0,0 +1,10 @@ > +--- hex.c.orig 1993-04-22 13:40:04.000000000 -0700 > ++++ hex.c 2017-10-06 07:25:01.182767000 -0700 > +@@ -85,6 +85,7 @@ > + char *s; > + > + do { > ++#define gets(a) fgets(a,sizeof(a),stdin) > + if( gets(str) == NULL ) gets(3) called only once in this port; why not simply patch that single call properly instead of bringing in a "poor man's" macro? ./danfe