[PATCH 04/12] Minor code cleanups in filtering code.
Ondrej Zajicek
santiago at crfreenet.org
Thu Oct 3 13:25:14 CEST 2013
On Mon, Sep 30, 2013 at 09:27:31PM +0300, Sergey Popovich wrote:
> * Remove duplicate f_eval_asn() declaration: already in filter/filter.h
>
> * Move tree_compare() from filter/filter.c to filter/tree.c and make it
> static as it only used in qsort(). Also remove definition from
> filter/filter.h.
>
> * Make printing of zero prefix in trie_print() at filter/trie.c to print
> AFI specific value.
Applied, thanks.
> * Move pm_format() from filter/filter.c to nest/a-path.c where other
> pm_* functions reside and also similar *_set_format() family already
> resides in nest/a-set.c.
>
> * Move tree_node_print() and tree_print() from filter/filter.c to
> filter/tree.c
> Make tree_node_print() static. Add global comment to tree_print()
> and declare
> it in filter.h. This is similar to trie_print() from filter/trie.c
This is a good idea, but i have currently some significant changes to
these functions in another branch, So i would postpone this to avoid
unnecessary conflicts.
> * Inline fprefix_get_bounds() from filter/filter.c in trie_add_prefix() at
> filter/filter.h as there is only one place where this code used.
I don't think this is good idea. Even if fprefix_get_bounds() should be
inlined, then it should be done by converting it to static inline function
to keep clean semantic separation.
--
Elen sila lumenn' omentielvo
Ondrej 'SanTiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20131003/5cb9c159/attachment.asc>
More information about the Bird-users
mailing list