]> git.proxmox.com Git - mirror_frr.git/commit
lib/zebra: remove code duplication in redist_del_instance()
authorRenato Westphal <renato@opensourcerouting.org>
Thu, 13 Oct 2016 16:06:10 +0000 (13:06 -0300)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 18 Oct 2016 12:51:24 +0000 (08:51 -0400)
commit43e7c3b42165321d7407c0454ef757023ce30179
treee5d25465aeb44f549103beeee78bb2a1d649b011
parent4e1cadf011e484ff865e0e54ce51adc32d1590e3
lib/zebra: remove code duplication in redist_del_instance()

Change redist_check_instance() to return a pointer instead of returning 1
on success. This way this function can be reused in redist_del_instance()
instead of duplicating the same logic there.

Also, remove unnecessary call to redist_check_instance() in
zebra_redistribute_delete().

While here, remove unnecessary cast from void* in redist_add_instance().

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
lib/zclient.c
lib/zclient.h
zebra/redistribute.c