diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2020-10-11 11:13:33 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2020-10-11 11:14:45 -0400 |
| commit | 62270cc3ee99318cbddd3000af4debee35c058c0 (patch) | |
| tree | 74e3239b7417485b3866d6b2b1c52b3d2b406a5a | |
| parent | ba49e033f5d6fc97a9aa1e407ac542d226f12ff4 (diff) | |
ospf6d: Make ospf6_lsa_lock follow normal FRR pattern
The normal ospf6_lsa_lock call should return the pointer
to the lock data structure we are holding. This is the
normal pattern for locking a data structure in FRR.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| -rw-r--r-- | ospf6d/ospf6_lsa.c | 4 | ||||
| -rw-r--r-- | ospf6d/ospf6_lsa.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index 9e7479c797..058284f5e9 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -601,10 +601,10 @@ struct ospf6_lsa *ospf6_lsa_copy(struct ospf6_lsa *lsa) } /* increment reference counter of struct ospf6_lsa */ -void ospf6_lsa_lock(struct ospf6_lsa *lsa) +struct ospf6_lsa *ospf6_lsa_lock(struct ospf6_lsa *lsa) { lsa->lock++; - return; + return lsa; } /* decrement reference counter of struct ospf6_lsa */ diff --git a/ospf6d/ospf6_lsa.h b/ospf6d/ospf6_lsa.h index a85d7b0603..cd873e2f00 100644 --- a/ospf6d/ospf6_lsa.h +++ b/ospf6d/ospf6_lsa.h @@ -226,8 +226,8 @@ ospf6_lsa_create_headeronly(struct ospf6_lsa_header *header); extern void ospf6_lsa_delete(struct ospf6_lsa *lsa); extern struct ospf6_lsa *ospf6_lsa_copy(struct ospf6_lsa *); -extern void ospf6_lsa_lock(struct ospf6_lsa *); -extern struct ospf6_lsa *ospf6_lsa_unlock(struct ospf6_lsa *); +extern struct ospf6_lsa *ospf6_lsa_lock(struct ospf6_lsa *lsa); +extern struct ospf6_lsa *ospf6_lsa_unlock(struct ospf6_lsa *lsa); extern int ospf6_lsa_expire(struct thread *); extern int ospf6_lsa_refresh(struct thread *); |
