Re: [patch]Use BUFSIZE instead of hard-code in netcat.c

2017-10-25 Thread Hiltjo Posthuma
On Tue, Oct 24, 2017 at 02:52:39PM +0200, Alexander Bluhm wrote: > On Tue, Oct 24, 2017 at 07:44:02PM +0800, Nan Xiao wrote: > > Use BUFSIZE instead of hard-code in netcat.c, FYI. Thanks! > > As this buffer is used with MSG_PEEK and its content is discarded, > the size does not really matter.

Re: [patch]Use BUFSIZE instead of hard-code in netcat.c

2017-10-24 Thread Nan Xiao
Ouch! I misunderstood the patch by @bluhm, please ignore my previous mail! I am very sorry for disrupting! Best Regards Nan Xiao On Tue, Oct 24, 2017 at 9:30 PM, Nan Xiao wrote: > Actually, I think "plen = sizeof(buf);" may be better. > Best Regards > Nan Xiao > > > On

Re: [patch]Use BUFSIZE instead of hard-code in netcat.c

2017-10-24 Thread Nan Xiao
Actually, I think "plen = sizeof(buf);" may be better. Best Regards Nan Xiao On Tue, Oct 24, 2017 at 8:52 PM, Alexander Bluhm wrote: > On Tue, Oct 24, 2017 at 07:44:02PM +0800, Nan Xiao wrote: >> Use BUFSIZE instead of hard-code in netcat.c, FYI. Thanks! > > As this

Re: [patch]Use BUFSIZE instead of hard-code in netcat.c

2017-10-24 Thread Alexander Bluhm
On Tue, Oct 24, 2017 at 07:44:02PM +0800, Nan Xiao wrote: > Use BUFSIZE instead of hard-code in netcat.c, FYI. Thanks! As this buffer is used with MSG_PEEK and its content is discarded, the size does not really matter. The complicated logic seems to be a leftover from the -j jumbo option. I

[patch]Use BUFSIZE instead of hard-code in netcat.c

2017-10-24 Thread Nan Xiao
Hi tech@, Use BUFSIZE instead of hard-code in netcat.c, FYI. Thanks! Best Regards Nan Xiao Index: netcat.c === RCS file: /cvs/src/usr.bin/nc/netcat.c,v retrieving revision 1.187 diff -u -p -r1.187 netcat.c --- netcat.c15 Jul