]> git.ipfire.org Git - thirdparty/nftables.git/commit
segtree: Use expr_clone in get_set_interval_*()
authorPhil Sutter <phil@nwl.cc>
Thu, 30 Apr 2020 11:45:40 +0000 (13:45 +0200)
committerPhil Sutter <phil@nwl.cc>
Mon, 4 May 2020 14:21:16 +0000 (16:21 +0200)
commita2eedcc89d2ed40411c26d53579300c4f1ccb83d
tree0cdcc707e89cb59b1ba7a80e6d09aecc0d515325
parent60ba9c22fecc0ca9bb2a61f6ad39bceed1aee38f
segtree: Use expr_clone in get_set_interval_*()

Both functions perform interval set lookups with either start and end or
only start values as input. Interestingly, in practice they either see
values which are not contained or which match an existing range exactly.

Make use of the above and just return a clone of the matching entry
instead of creating a new one based on input data.

Signed-off-by: Phil Sutter <phil@nwl.cc>
src/segtree.c