summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_lsdb.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-07-05 09:28:50 -0400
committerDonald Sharp <sharpd@nvidia.com>2023-07-12 17:56:29 -0400
commit0cbd5855a97197f62b04a5b90ac79d78725511cb (patch)
tree545b3f60c52bf3ca8fa45b8b305736d1b30278ce /ospf6d/ospf6_lsdb.h
parentc362e274b22eb411793ab93a50a9ed6e7bc67889 (diff)
ospf6d: Convert ospf6_lsa_unlock to a better api
Make the ospf6_lsa_unlock take the same parameters that the ospf_lsa_unlock does to make it consistent and to also ensure that no-one can make the mistake of getting the pointer cleared up. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospf6d/ospf6_lsdb.h')
-rw-r--r--ospf6d/ospf6_lsdb.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/ospf6d/ospf6_lsdb.h b/ospf6d/ospf6_lsdb.h
index a2444f1c14..604406d75f 100644
--- a/ospf6d/ospf6_lsdb.h
+++ b/ospf6d/ospf6_lsdb.h
@@ -63,11 +63,11 @@ extern struct ospf6_lsa *ospf6_lsdb_next(const struct route_node *iterend,
* it really early.
*/
#define ALL_LSDB(lsdb, lsa, lsanext) \
- const struct route_node *iterend = \
- ospf6_lsdb_head(lsdb, 0, 0, 0, &lsa); \
- (lsa) != NULL && ospf6_lsa_lock(lsa) \
- && ((lsanext) = ospf6_lsdb_next(iterend, (lsa)), 1); \
- ospf6_lsa_unlock(lsa), (lsa) = (lsanext)
+ const struct route_node *iterend = ospf6_lsdb_head(lsdb, 0, 0, 0, \
+ &lsa); \
+ (lsa) != NULL && ospf6_lsa_lock(lsa) && \
+ ((lsanext) = ospf6_lsdb_next(iterend, (lsa)), 1); \
+ ospf6_lsa_unlock(&lsa), (lsa) = (lsanext)
extern void ospf6_lsdb_remove_all(struct ospf6_lsdb *lsdb);
extern void ospf6_lsdb_lsa_unlock(struct ospf6_lsa *lsa);