freebsd-skq/contrib/ipfilter/tools
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
..
BNF.ipf
BNF.ipnat
ipf_y.y calloc() and realloc() modernization. 2017-03-16 04:40:07 +00:00
ipf.c Use normal KNF cuddling of elses. 2017-01-26 04:51:48 +00:00
ipfcomp.c calloc() and realloc() modernization. 2017-03-16 04:40:07 +00:00
ipfs.c
ipfstat.c calloc() and realloc() modernization. 2017-03-16 04:40:07 +00:00
ipfsyncd.c
ipftest.c
ipmon_y.y
ipmon.c
ipnat_y.y
ipnat.c
ippool_y.y
ippool.c
ipscan_y.y
ipsyncm.c
ipsyncs.c
lex_var.h
lexer.c
lexer.h
Makefile