Re: [patch ping.c] replace malloc & memset with calloc

2014-04-23 Thread Jérémie Courrèges-Anglas
Florian Obser writes: > On Tue, Apr 22, 2014 at 03:08:45PM -0400, pe...@petermalone.org wrote: >> Thanks Florian & team. >> >> Please review the following diff. > > tab vs. space, more in sync with ping6 > OK? ok. -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Re: [patch ping.c] replace malloc & memset with calloc

2014-04-23 Thread Florian Obser
On Tue, Apr 22, 2014 at 03:08:45PM -0400, pe...@petermalone.org wrote: > Thanks Florian & team. > > Please review the following diff. tab vs. space, more in sync with ping6 OK? diff --git ping.c ping.c index 6a13a86..29cf84c 100644 --- ping.c +++ ping.c @@ -70,6 +70,7 @@ #include #include #

Re: [patch ping.c] replace malloc & memset with calloc

2014-04-22 Thread peter
Thanks Florian & team. Please review the following diff. Index: ping.c === RCS file: /cvs/src/sbin/ping/ping.c,v retrieving revision 1.100 diff -u -p -u -r1.100 ping.c --- ping.c 24 Mar 2014 11:11:49 - 1.100 +++ ping.c

Re: [patch ping.c] replace malloc & memset with calloc

2014-04-22 Thread Theo de Raadt
You are now clearing only the first time. > malloc & memset can be replaced with calloc in ping.c. Please see below > for patch details: > > Index: ping.c > === > RCS file: /cvs/src/sbin/ping/ping.c,v > retrieving revision 1.100 > d

Re: [patch ping.c] replace malloc & memset with calloc

2014-04-22 Thread Claudio Jeker
On Tue, Apr 22, 2014 at 12:45:25AM -0400, Peter Malone wrote: > Hi, > > malloc & memset can be replaced with calloc in ping.c. Please see below for > patch details: > > Index: ping.c > === > RCS file: /cvs/src/sbin/ping/ping.c,v > re

Re: [patch ping.c] replace malloc & memset with calloc

2014-04-22 Thread Florian Obser
Please switch it to poll(2) like ping6(8) is doing, there by side stepping the whole issue. On Tue, Apr 22, 2014 at 09:33:50AM +0200, Otto Moerbeek wrote: > On Tue, Apr 22, 2014 at 02:57:54AM -0400, pe...@petermalone.org wrote: > > > Sure - I should have spotted that. > > Still not there. Please

Re: [patch ping.c] replace malloc & memset with calloc

2014-04-22 Thread Otto Moerbeek
On Tue, Apr 22, 2014 at 02:57:54AM -0400, pe...@petermalone.org wrote: > Sure - I should have spotted that. Still not there. Please use the fact that calloc can multiply, you get an overflow check for free. -Otto > > Index: ping.c >

Re: [patch ping.c] replace malloc & memset with calloc

2014-04-21 Thread peter
Sure - I should have spotted that. Index: ping.c === RCS file: /cvs/src/sbin/ping/ping.c,v retrieving revision 1.100 diff -u -r1.100 ping.c --- ping.c 24 Mar 2014 11:11:49 - 1.100 +++ ping.c 22 Apr 2014 06:55:03 -0

Re: [patch ping.c] replace malloc & memset with calloc

2014-04-21 Thread Otto Moerbeek
On Tue, Apr 22, 2014 at 12:45:25AM -0400, Peter Malone wrote: > Hi, > > malloc & memset can be replaced with calloc in ping.c. Please see below for > patch details: Better rework this to get rid of fdmasks. -Otto > > Index: ping.c >

[patch ping.c] replace malloc & memset with calloc

2014-04-21 Thread Peter Malone
Hi, malloc & memset can be replaced with calloc in ping.c. Please see below for patch details: Index: ping.c === RCS file: /cvs/src/sbin/ping/ping.c,v retrieving revision 1.100 diff -u -p -u -r1.100 ping.c --- ping.c24 Mar 201