chiark / gitweb /
NEW etc.: Replace most calls to safe_realloc_ary
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 7 Oct 2014 19:41:20 +0000 (20:41 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 9 Oct 2014 18:30:01 +0000 (19:30 +0100)
commit743f4244af98df144708d598ab16b01dcf43dc4f
treee1ec4b2853fcad6a7364c0825e840e28bcf4396b
parentc5afa049f0eb076da0e6a0009cf371f357740653
NEW etc.: Replace most calls to safe_realloc_ary

Replace with REALLOC_ARY whenever the array object size is not 1

In subnet_list_set_len and ipset_set_len we abolish the unnecessary
temporary variable `nd'.  In subnet_list_set_len we also simplify the
assert integer overflow condition (the division is not needed because
REALLOC_ARY and hence safe_malloc_ary will check for potential
multiplication overflow).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
ipaddr.c
secnet.c