diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-07-23 12:23:25 -0400 |
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-07-31 11:35:21 -0400 |
| commit | da098d78bb6fbdfb62444f0b0a7aac86875bf3c3 (patch) | |
| tree | 0d8121f06ed024857287880c5c68957184b1b3a7 /lib/typerb.c | |
| parent | 2e6f2d6bc7edb7a75e24d1f8eb15a769d091f64e (diff) | |
lib: Impelement the `*_del` list API.
The new list api did not implement the `*_del` endpoint as
it was described in the docs here:
http://docs.frrouting.org/projects/dev-guide/en/latest/lists.html#c.Z_del
This patch implements the endpoints to return the object deleted if
found, otherwise NULL for all but the atomic lists.
The atomic list `*_del` code is marked as TODO and will remain undefined
for now.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'lib/typerb.c')
| -rw-r--r-- | lib/typerb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/typerb.c b/lib/typerb.c index 4c48d6434f..3886fc678e 100644 --- a/lib/typerb.c +++ b/lib/typerb.c @@ -333,9 +333,10 @@ color: return (old); } -void typed_rb_remove(struct rbt_tree *rbt, struct rb_entry *rbe) +struct typed_rb_entry *typed_rb_remove(struct rbt_tree *rbt, + struct rb_entry *rbe) { - rbe_remove(rbt, rbe); + return rbe_remove(rbt, rbe); } struct typed_rb_entry *typed_rb_insert(struct rbt_tree *rbt, |
