diff options
author | Cy Schubert <cy@FreeBSD.org> | 2017-10-09 16:58:44 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2017-10-09 16:58:44 +0000 |
commit | f81d9b210f39b31006123928b8e4b89ca8ecf49d (patch) | |
tree | ef20d87ffc4d34c7dfb0d6d8fddaaf8cfc2ecb9b /net/tcpview | |
parent | 11b44a34624cc7fc8d30ee965e1b083068b6310e (diff) | |
download | ports-f81d9b210f39b31006123928b8e4b89ca8ecf49d.tar.gz ports-f81d9b210f39b31006123928b8e4b89ca8ecf49d.zip |
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.
This is for ttps://reviews.freebsd.org/D12298.
PR: 222796
Requested by: emaste
Notes
Notes:
svn path=/head/; revision=451623
Diffstat (limited to 'net/tcpview')
-rw-r--r-- | net/tcpview/Makefile | 2 | ||||
-rw-r--r-- | net/tcpview/files/patch-hex.c | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/net/tcpview/Makefile b/net/tcpview/Makefile index a129da39dd02..88086fa1f133 100644 --- a/net/tcpview/Makefile +++ b/net/tcpview/Makefile @@ -3,7 +3,7 @@ PORTNAME= tcpview PORTVERSION= 1.0 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= net MASTER_SITES= ftp://ftp.cac.washington.edu/pub/noc-tools/tcpview/ diff --git a/net/tcpview/files/patch-hex.c b/net/tcpview/files/patch-hex.c new file mode 100644 index 000000000000..3543ab5eb51c --- /dev/null +++ b/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 ) + return NULL; + if( *str != '\t' && *str != ' ' && PrintFrames ) |