mbox series

[nft,0/4] Covscan-induced review of ei_insert()

Message ID 20200123143049.13888-1-phil@nwl.cc
Headers show
Series Covscan-induced review of ei_insert() | expand

Message

Phil Sutter Jan. 23, 2020, 2:30 p.m. UTC
False covscan report led to closer investigation ei_insert() which
identified dead code and some opportunities for improvement due to the
fact that the only caller sorts the new intervals prior to calling said
function.

Note that if we at some point want to support merging of new and old set
elements, we will probably have to revert these patches since we can't
be sure anymore that there aren't any items with bigger values in the
set already.

Phil Sutter (4):
  segtree: Drop needless insertion in ei_insert()
  segtree: Drop dead code in ei_insert()
  segtree: Simplify overlap case in ei_insert()
  segtree: Refactor ei_insert()

 src/segtree.c | 101 +++++++++++++-------------------------------------
 1 file changed, 25 insertions(+), 76 deletions(-)