* isis_adjacency.c, isis_lsp.c, isisd.c: Replace XMALLOC && memset
with XCALLOC.
* isis_lsp.c (lsp_build_pseudo): Fix adding ES neighbour.
* isis_tlv.c: More compact free_tlvs() function.
* isis_lsp.c (lsp_build_nonpseudo) : Try to fix one more regression
introduced by stream cleanup. Seek enp to the right place before
starting to fill stream with TLVs.
diff --git a/isisd/isis_tlv.c b/isisd/isis_tlv.c
index 1194f04..1850e15 100644
--- a/isisd/isis_tlv.c
+++ b/isisd/isis_tlv.c
@@ -61,59 +61,34 @@
free_tlvs (struct tlvs *tlvs)
{
if (tlvs->area_addrs)
- {
- list_delete (tlvs->area_addrs);
- }
+ list_delete (tlvs->area_addrs);
if (tlvs->is_neighs)
- {
- list_delete (tlvs->is_neighs);
- }
+ list_delete (tlvs->is_neighs);
if (tlvs->te_is_neighs)
- {
- list_delete (tlvs->te_is_neighs);
- }
+ list_delete (tlvs->te_is_neighs);
if (tlvs->es_neighs)
- {
- list_delete (tlvs->es_neighs);
- }
+ list_delete (tlvs->es_neighs);
if (tlvs->lsp_entries)
- {
- list_delete (tlvs->lsp_entries);
- }
+ list_delete (tlvs->lsp_entries);
if (tlvs->lan_neighs)
- {
- list_delete (tlvs->lan_neighs);
- }
+ list_delete (tlvs->lan_neighs);
if (tlvs->prefix_neighs)
- {
- list_delete (tlvs->prefix_neighs);
- }
+ list_delete (tlvs->prefix_neighs);
if (tlvs->ipv4_addrs)
- {
- list_delete (tlvs->ipv4_addrs);
- }
+ list_delete (tlvs->ipv4_addrs);
if (tlvs->ipv4_int_reachs)
- {
- list_delete (tlvs->ipv4_int_reachs);
- }
+ list_delete (tlvs->ipv4_int_reachs);
if (tlvs->ipv4_ext_reachs)
- {
- list_delete (tlvs->ipv4_ext_reachs);
- }
+ list_delete (tlvs->ipv4_ext_reachs);
if (tlvs->te_ipv4_reachs)
- {
- list_delete (tlvs->te_ipv4_reachs);
- }
+ list_delete (tlvs->te_ipv4_reachs);
#ifdef HAVE_IPV6
if (tlvs->ipv6_addrs)
- {
- list_delete (tlvs->ipv6_addrs);
- }
+ list_delete (tlvs->ipv6_addrs);
if (tlvs->ipv6_reachs)
- {
- list_delete (tlvs->ipv6_reachs);
- }
+ list_delete (tlvs->ipv6_reachs);
#endif /* HAVE_IPV6 */
+
return;
}