diff options
| author | Christian Hopps <chopps@labn.net> | 2022-02-24 01:43:48 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-24 01:43:48 -0500 |
| commit | 7bf63db79b7848b73e1cef49f3496038644bea16 (patch) | |
| tree | 2c95921d910689673348e60f9614de7d9d00c4e7 /ospf6d/ospf6_intra.c | |
| parent | ca6c97340b013e140c0cb31737858f7c672b7dfb (diff) | |
| parent | cc9f21da2218d95567eff1501482ce58e6600f54 (diff) | |
Merge pull request #10632 from donaldsharp/thread_return_null
*: Change thread->func to return void instead of int
Diffstat (limited to 'ospf6d/ospf6_intra.c')
| -rw-r--r-- | ospf6d/ospf6_intra.c | 54 |
1 files changed, 22 insertions, 32 deletions
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index da5cad0537..f3fd9dab66 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -224,7 +224,7 @@ int ospf6_router_is_stub_router(struct ospf6_lsa *lsa) return OSPF6_NOT_STUB_ROUTER; } -int ospf6_router_lsa_originate(struct thread *thread) +void ospf6_router_lsa_originate(struct thread *thread) { struct ospf6_area *oa; @@ -249,7 +249,7 @@ int ospf6_router_lsa_originate(struct thread *thread) if (IS_DEBUG_OSPF6_GR) zlog_debug( "Graceful Restart in progress, don't originate LSA"); - return 0; + return; } if (IS_OSPF6_DEBUG_ORIGINATE(ROUTER)) @@ -294,7 +294,7 @@ int ospf6_router_lsa_originate(struct thread *thread) + sizeof(struct ospf6_router_lsa)) { zlog_warn( "Size limit setting for Router-LSA too short"); - return 0; + return; } /* Fill LSA Header */ @@ -433,8 +433,6 @@ int ospf6_router_lsa_originate(struct thread *thread) if (count && !link_state_id) ospf6_spf_schedule(oa->ospf6, OSPF6_SPF_FLAGS_ROUTER_LSA_ORIGINATED); - - return 0; } /*******************************/ @@ -511,7 +509,7 @@ static int ospf6_network_lsa_show(struct vty *vty, struct ospf6_lsa *lsa, return 0; } -int ospf6_network_lsa_originate(struct thread *thread) +void ospf6_network_lsa_originate(struct thread *thread) { struct ospf6_interface *oi; @@ -538,7 +536,7 @@ int ospf6_network_lsa_originate(struct thread *thread) if (IS_DEBUG_OSPF6_GR) zlog_debug( "Graceful Restart in progress, don't originate LSA"); - return 0; + return; } old = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_NETWORK), @@ -558,7 +556,7 @@ int ospf6_network_lsa_originate(struct thread *thread) oi->area->ospf6, OSPF6_SPF_FLAGS_NETWORK_LSA_ORIGINATED); } - return 0; + return; } if (IS_OSPF6_DEBUG_ORIGINATE(NETWORK)) @@ -577,7 +575,7 @@ int ospf6_network_lsa_originate(struct thread *thread) zlog_debug("Interface stub, ignore"); if (old) ospf6_lsa_purge(old); - return 0; + return; } /* prepare buffer */ @@ -635,8 +633,6 @@ int ospf6_network_lsa_originate(struct thread *thread) /* Originate */ ospf6_lsa_originate_area(lsa, oi->area); - - return 0; } @@ -765,7 +761,7 @@ static int ospf6_link_lsa_show(struct vty *vty, struct ospf6_lsa *lsa, return 0; } -int ospf6_link_lsa_originate(struct thread *thread) +void ospf6_link_lsa_originate(struct thread *thread) { struct ospf6_interface *oi; @@ -785,7 +781,7 @@ int ospf6_link_lsa_originate(struct thread *thread) if (IS_DEBUG_OSPF6_GR) zlog_debug( "Graceful Restart in progress, don't originate LSA"); - return 0; + return; } @@ -797,7 +793,7 @@ int ospf6_link_lsa_originate(struct thread *thread) if (CHECK_FLAG(oi->flag, OSPF6_INTERFACE_DISABLE)) { if (old) ospf6_lsa_purge(old); - return 0; + return; } if (IS_OSPF6_DEBUG_ORIGINATE(LINK)) @@ -812,7 +808,7 @@ int ospf6_link_lsa_originate(struct thread *thread) oi->interface->name); if (old) ospf6_lsa_purge(old); - return 0; + return; } /* prepare buffer */ @@ -860,8 +856,6 @@ int ospf6_link_lsa_originate(struct thread *thread) /* Originate */ ospf6_lsa_originate_interface(lsa, oi); - - return 0; } @@ -1003,7 +997,7 @@ static int ospf6_intra_prefix_lsa_show(struct vty *vty, struct ospf6_lsa *lsa, return 0; } -int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread) +void ospf6_intra_prefix_lsa_originate_stub(struct thread *thread) { struct ospf6_area *oa; @@ -1028,7 +1022,7 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread) if (IS_DEBUG_OSPF6_GR) zlog_debug( "Graceful Restart in progress, don't originate LSA"); - return 0; + return; } /* find previous LSA */ @@ -1051,7 +1045,7 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread) oa->lsdb); } } - return 0; + return; } if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX)) @@ -1127,7 +1121,7 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread) } } ospf6_route_table_delete(route_advertise); - return 0; + return; } /* Neighbor change to FULL, if INTRA-AREA-PREFIX LSA @@ -1212,7 +1206,7 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread) if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX)) zlog_debug( "Quit to Advertise Intra-Prefix: no route to advertise"); - return 0; + return; } intra_prefix_lsa->prefix_num = htons(prefix_num); @@ -1235,12 +1229,10 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread) /* Originate */ ospf6_lsa_originate_area(lsa, oa); - - return 0; } -int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread) +void ospf6_intra_prefix_lsa_originate_transit(struct thread *thread) { struct ospf6_interface *oi; @@ -1268,7 +1260,7 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread) if (IS_DEBUG_OSPF6_GR) zlog_debug( "Graceful Restart in progress, don't originate LSA"); - return 0; + return; } /* find previous LSA */ @@ -1279,7 +1271,7 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread) if (CHECK_FLAG(oi->flag, OSPF6_INTERFACE_DISABLE)) { if (old) ospf6_lsa_purge(old); - return 0; + return; } if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX)) @@ -1304,7 +1296,7 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread) zlog_debug(" Interface is not DR"); if (old) ospf6_lsa_purge(old); - return 0; + return; } full_count = 0; @@ -1317,7 +1309,7 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread) zlog_debug(" Interface is stub"); if (old) ospf6_lsa_purge(old); - return 0; + return; } /* connected prefix to advertise */ @@ -1406,7 +1398,7 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread) if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX)) zlog_debug( "Quit to Advertise Intra-Prefix: no route to advertise"); - return 0; + return; } intra_prefix_lsa->prefix_num = htons(prefix_num); @@ -1429,8 +1421,6 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread) /* Originate */ ospf6_lsa_originate_area(lsa, oi->area); - - return 0; } static void ospf6_intra_prefix_update_route_origin(struct ospf6_route *oa_route, |
