freebsd-dev/contrib/ipfilter/ipsend
Cy Schubert 3820c3aa3f calloc() and realloc() modernization.
This commit replaces calloc calls, which called calloc() as if it were
malloc() by allocating a multiple of objects as a sizeof multiplied by
the number of objects. The patch rectifies this by calling calloc() as
it was meant to be called.

This commit also replaces realloc() with reallocarray() in a similar
fashion as above. Instead of calculating the memory to reallocated
(changed) by multiplying sizeof by the number of objects, the sizeof
and number are passed as separate arguments to reallocarray(), letting
reallocarray() do the multiplication instead. Like the calloc()
adjustment above, this is approach is cleaner and more elegant than
than the previous code.

This has been tested on my production firewall and a laptop (also
running ipfilter).

Submitted by:	pfg
MFC after:	6 weeks
2017-03-16 04:40:07 +00:00
..
.OLD As per the developers handbook (5.3.1 step 1), prepare the vendor trees for 2013-07-19 05:41:57 +00:00
44arp.c Stop including if_var.h from userland. 2015-04-06 09:42:23 +00:00
arp.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
Crashable As per the developers handbook (5.3.1 step 1), prepare the vendor trees for 2013-07-19 05:41:57 +00:00
dlcommon.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
dltest.h As per the developers handbook (5.3.1 step 1), prepare the vendor trees for 2013-07-19 05:41:57 +00:00
ip.c Stop including if_var.h from userland. 2015-04-06 09:42:23 +00:00
ipresend.1 As per the developers handbook (5.3.1 step 1), prepare the vendor trees for 2013-07-19 05:41:57 +00:00
ipresend.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
ipsend.1 As per the developers handbook (5.3.1 step 1), prepare the vendor trees for 2013-07-19 05:41:57 +00:00
ipsend.5 Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
ipsend.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
ipsend.h Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
ipsopt.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
iptest.1 As per the developers handbook (5.3.1 step 1), prepare the vendor trees for 2013-07-19 05:41:57 +00:00
iptest.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
iptests.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
larp.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
linux.h Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
lsock.c calloc() and realloc() modernization. 2017-03-16 04:40:07 +00:00
Makefile Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
resend.c Stop including if_var.h from userland. 2015-04-06 09:42:23 +00:00
sbpf.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
sdlpi.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
sirix.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
slinux.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
snit.c Update ipfilter 4.1.28 --> 5.1.2. 2013-09-06 23:11:19 +00:00
sock.c calloc() and realloc() modernization. 2017-03-16 04:40:07 +00:00
sockraw.c As per the developers handbook (5.3.1 step 1), prepare the vendor trees for 2013-07-19 05:41:57 +00:00