Date: Mon, 9 Oct 2017 17:07:19 +0000 From: Alexey Dokuchaev <danfe@FreeBSD.org> To: Cy Schubert <cy@FreeBSD.org> 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> In-Reply-To: <201710091658.v99GwjlO076327@repo.freebsd.org> References: <201710091658.v99GwjlO076327@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171009170719.GA89682>