diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-03-06 09:23:22 -0500 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-03-06 09:23:22 -0500 | 
| commit | 5e81f5dd1a2dd82ee6aa08f4a9375e4cd83407a0 (patch) | |
| tree | 1f1d7fa1e9f47f3b7b3d312ed94685b84c781081 /ospf6d | |
| parent | 9c37fcdddaee63dbd71d8dac1d5a54add74e2665 (diff) | |
*: Finish off the __PRETTY_FUNCTION__ to __func__
FINISH IT
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ospf6d')
| -rw-r--r-- | ospf6d/ospf6_abr.c | 96 | ||||
| -rw-r--r-- | ospf6d/ospf6_asbr.c | 64 | ||||
| -rw-r--r-- | ospf6d/ospf6_flood.c | 2 | ||||
| -rw-r--r-- | ospf6d/ospf6_intra.c | 65 | ||||
| -rw-r--r-- | ospf6d/ospf6_spf.c | 2 | 
5 files changed, 118 insertions, 111 deletions
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c index b0d501dab4..ead186b6fc 100644 --- a/ospf6d/ospf6_abr.c +++ b/ospf6d/ospf6_abr.c @@ -763,11 +763,13 @@ void ospf6_abr_old_path_update(struct ospf6_route *old_route,  		}  		if (IS_OSPF6_DEBUG_ABR || IS_OSPF6_DEBUG_EXAMIN(INTER_PREFIX)) -			zlog_debug("%s: paths %u nh %u", __PRETTY_FUNCTION__, -				   old_route->paths ? -				   listcount(old_route->paths) : 0, -				   old_route->nh_list ? -				   listcount(old_route->nh_list) : 0); +			zlog_debug("%s: paths %u nh %u", __func__, +				   old_route->paths +					   ? listcount(old_route->paths) +					   : 0, +				   old_route->nh_list +					   ? listcount(old_route->nh_list) +					   : 0);  		if (table->hook_add)  			(*table->hook_add)(old_route); @@ -823,9 +825,10 @@ void ospf6_abr_old_route_remove(struct ospf6_lsa *lsa,  					prefix2str(&old->prefix, buf,  						   sizeof(buf));  					zlog_debug("%s: old %s updated nh %u", -						   __PRETTY_FUNCTION__, buf, -						   old->nh_list ? -						   listcount(old->nh_list) : 0); +						   __func__, buf, +						   old->nh_list ? listcount( +							   old->nh_list) +								: 0);  				}  				if (table->hook_add) @@ -879,8 +882,8 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)  	if (lsa->header->type == htons(OSPF6_LSTYPE_INTER_PREFIX)) {  		if (IS_OSPF6_DEBUG_EXAMIN(INTER_PREFIX)) {  			is_debug++; -			zlog_debug("%s: Examin %s in area %s", -				   __PRETTY_FUNCTION__, lsa->name, oa->name); +			zlog_debug("%s: Examin %s in area %s", __func__, +				   lsa->name, oa->name);  		}  		prefix_lsa = @@ -899,8 +902,8 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)  	} else if (lsa->header->type == htons(OSPF6_LSTYPE_INTER_ROUTER)) {  		if (IS_OSPF6_DEBUG_EXAMIN(INTER_ROUTER)) {  			is_debug++; -			zlog_debug("%s: Examin %s in area %s", -				   __PRETTY_FUNCTION__, lsa->name, oa->name); +			zlog_debug("%s: Examin %s in area %s", __func__, +				   lsa->name, oa->name);  		}  		router_lsa = @@ -947,9 +950,10 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)  						old = route;  						if (is_debug) -							zlog_debug("%s: old entry found in paths, adv_router %s", -							__PRETTY_FUNCTION__, -							adv_router); +							zlog_debug( +								"%s: old entry found in paths, adv_router %s", +								__func__, +								adv_router);  						break;  					} @@ -974,8 +978,8 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)  	}  	if (OSPF6_LSA_IS_MAXAGE(lsa)) {  		if (is_debug) -			zlog_debug("%s: LSA %s is MaxAge, ignore", -				   __PRETTY_FUNCTION__, lsa->name); +			zlog_debug("%s: LSA %s is MaxAge, ignore", __func__, +				   lsa->name);  		if (old)  			ospf6_abr_old_route_remove(lsa, old, table);  		return; @@ -1054,21 +1058,21 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)  	    || CHECK_FLAG(abr_entry->flag, OSPF6_ROUTE_REMOVE)  	    || !CHECK_FLAG(abr_entry->path.router_bits, OSPF6_ROUTER_BIT_B)) {  		if (is_debug) -			zlog_debug("%s: ABR router entry does not exist, ignore", -				   __PRETTY_FUNCTION__); +			zlog_debug( +				"%s: ABR router entry does not exist, ignore", +				__func__);  		if (old) {  			if (old->type == OSPF6_DEST_TYPE_ROUTER &&  			    oa->intra_brouter_calc) {  				if (is_debug)  					zlog_debug( -						   "%s: intra_brouter_calc is on, skip brouter remove: %s (%p)", -						   __PRETTY_FUNCTION__, buf, -						   (void *)old); +						"%s: intra_brouter_calc is on, skip brouter remove: %s (%p)", +						__func__, buf, (void *)old);  			} else {  				if (is_debug) -					zlog_debug("%s: remove old entry: %s %p ", -						   __PRETTY_FUNCTION__, buf, -						   (void *)old); +					zlog_debug( +						"%s: remove old entry: %s %p ", +						__func__, buf, (void *)old);  				ospf6_route_remove(old, table);  			}  		} @@ -1143,11 +1147,10 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)  		if ((ospf6_route_cmp(route, old_route) != 0)) {  			if (is_debug) {  				prefix2str(&prefix, buf, sizeof(buf)); -				zlog_debug("%s: old %p %s cost %u new route cost %u are not same", -					   __PRETTY_FUNCTION__, -					   (void *)old_route, buf, -					   old_route->path.cost, -					   route->path.cost); +				zlog_debug( +					"%s: old %p %s cost %u new route cost %u are not same", +					__func__, (void *)old_route, buf, +					old_route->path.cost, route->path.cost);  			}  			/* Check new route's adv. router is same in one of @@ -1186,14 +1189,15 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)  				inet_ntop(AF_INET,  					  &ecmp_path->origin.adv_router,  					  adv_router, sizeof(adv_router)); -				zlog_debug("%s: route %s cost %u another path %s added with nh %u, effective paths %u nh %u", -						__PRETTY_FUNCTION__, buf, -						old_route->path.cost, -						adv_router, -						listcount(ecmp_path->nh_list), -						old_route->paths ? -						listcount(old_route->paths) : 0, -						listcount(old_route->nh_list)); +				zlog_debug( +					"%s: route %s cost %u another path %s added with nh %u, effective paths %u nh %u", +					__func__, buf, old_route->path.cost, +					adv_router, +					listcount(ecmp_path->nh_list), +					old_route->paths +						? listcount(old_route->paths) +						: 0, +					listcount(old_route->nh_list));  			}  		} else {  			/* adv. router exists in the list, update the nhs */ @@ -1202,10 +1206,11 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)  		}  		if (is_debug) -			zlog_debug("%s: Update route: %s %p old cost %u new cost %u nh %u", -				   __PRETTY_FUNCTION__, buf, (void *)old_route, -				   old_route->path.cost, route->path.cost, -				   listcount(route->nh_list)); +			zlog_debug( +				"%s: Update route: %s %p old cost %u new cost %u nh %u", +				__func__, buf, (void *)old_route, +				old_route->path.cost, route->path.cost, +				listcount(route->nh_list));  		/* For Inter-Prefix route: Update RIB/FIB,  		 * For Inter-Router trigger summary update @@ -1222,9 +1227,10 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)  		if (is_debug) {  			inet_ntop(AF_INET, &route->path.origin.adv_router,  				  adv_router, sizeof(adv_router)); -			zlog_debug("%s: Install route: %s cost %u nh %u adv_router %s ", -				   __PRETTY_FUNCTION__, buf, route->path.cost, -				   listcount(route->nh_list), adv_router); +			zlog_debug( +				"%s: Install route: %s cost %u nh %u adv_router %s ", +				__func__, buf, route->path.cost, +				listcount(route->nh_list), adv_router);  		}  		path = ospf6_path_dup(&route->path); diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 486e4d8d2a..805e411c7b 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -166,7 +166,7 @@ int ospf6_orig_as_external_lsa(struct thread *thread)  		if (IS_OSPF6_DEBUG_ASBR)  			zlog_debug(  				"%s: Send update of AS-External LSA %s seq 0x%x", -				__PRETTY_FUNCTION__, lsa->name, +				__func__, lsa->name,  				ntohl(lsa->header->seqnum));  		ospf6_flood_interface(NULL, lsa, oi); @@ -245,7 +245,7 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old,  					   sizeof(buf));  				zlog_debug(  					"%s: route %s cost old %u new %u is not same, replace route", -					__PRETTY_FUNCTION__, buf, o_path->cost, +					__func__, buf, o_path->cost,  					route->path.cost);  			} @@ -309,7 +309,7 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old,  						   sizeof(buf));  					zlog_debug(  						"%s: route %s old cost %u new cost %u, delete old entry.", -						__PRETTY_FUNCTION__, buf, +						__func__, buf,  						old_route->path.cost,  						route->path.cost);  				} @@ -340,8 +340,7 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old,  					   sizeof(buf));  				zlog_debug(  					"%s: old route %s path  cost %u e2 %u", -					__PRETTY_FUNCTION__, buf, -					old_route->path.cost, +					__func__, buf, old_route->path.cost,  					old_route->path.u.cost_e2);  			}  			route_found = true; @@ -378,13 +377,11 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old,  						   sizeof(buf));  					zlog_debug(  						"%s: route %s another path added with nh %u, effective paths %u nh %u", -						__PRETTY_FUNCTION__, buf, +						__func__, buf,  						listcount(ecmp_path->nh_list), -						old_route->paths -							? listcount( -								  old_route -									  ->paths) -							: 0, +						old_route->paths ? listcount( +							old_route->paths) +								 : 0,  						listcount(old_route->nh_list));  				}  			} else { @@ -410,9 +407,9 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old,  							AS_EXTERNAL)) {  						prefix2str(&old_route->prefix,  							   buf, sizeof(buf)); -						zlog_debug("%s: ls_prfix %s asbr_entry not found.", -							   __PRETTY_FUNCTION__, -							   buf); +						zlog_debug( +							"%s: ls_prfix %s asbr_entry not found.", +							__func__, buf);  					}  					continue;  				} @@ -422,12 +419,15 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old,  			if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL)) {  				prefix2str(&route->prefix, buf, sizeof(buf)); -				zlog_debug("%s: route %s with effective paths %u nh %u", -					   __PRETTY_FUNCTION__, buf, -					   old_route->paths ? -					   listcount(old_route->paths) : 0, -					   old_route->nh_list ? -					   listcount(old_route->nh_list) : 0); +				zlog_debug( +					"%s: route %s with effective paths %u nh %u", +					__func__, buf, +					old_route->paths +						? listcount(old_route->paths) +						: 0, +					old_route->nh_list +						? listcount(old_route->nh_list) +						: 0);  			}  			/* Update RIB/FIB */ @@ -621,9 +621,8 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,  		prefix2str(&prefix, buf, sizeof(buf));  		zlog_debug(  			"%s: Current route %s cost %u e2 %u, route to del cost %u e2 %u", -			__PRETTY_FUNCTION__, buf, route->path.cost, -			route->path.u.cost_e2, route_to_del->path.cost, -			route_to_del->path.u.cost_e2); +			__func__, buf, route->path.cost, route->path.u.cost_e2, +			route_to_del->path.cost, route_to_del->path.u.cost_e2);  	}  	for (ospf6_route_lock(route); @@ -670,8 +669,8 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,  							   sizeof(buf));  						zlog_debug(  							"%s: route %s to delete is not same, cost %u del cost %u. skip", -							__PRETTY_FUNCTION__, -							buf, route->path.cost, +							__func__, buf, +							route->path.cost,  							route_to_del->path  								.cost);  					} @@ -682,8 +681,7 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,  					prefix2str(&prefix, buf, sizeof(buf));  					zlog_debug(  						"%s: route %s path found with cost %u nh %u to remove.", -						__PRETTY_FUNCTION__, buf, -						route->path.cost, +						__func__, buf, route->path.cost,  						listcount(o_path->nh_list));  				} @@ -726,14 +724,15 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,  						   sizeof(buf));  					zlog_debug(  						"%s: AS-External %u route %s update paths %u nh %u", -						__PRETTY_FUNCTION__, +						__func__,  						(route->path.type  						 == OSPF6_PATH_TYPE_EXTERNAL1)  							? 1  							: 2,  						buf, listcount(route->paths), -						route->nh_list ? -						listcount(route->nh_list) : 0); +						route->nh_list ? listcount( +							route->nh_list) +							       : 0);  				}  				if (listcount(route->paths)) { @@ -785,8 +784,7 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,  					prefix2str(&prefix, buf, sizeof(buf));  					zlog_debug(  						"%s: route %s to delete is not same, cost %u del cost %u. skip", -						__PRETTY_FUNCTION__, buf, -						route->path.cost, +						__func__, buf, route->path.cost,  						route_to_del->path.cost);  				}  				continue; @@ -802,7 +800,7 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,  			prefix2str(&route->prefix, buf, sizeof(buf));  			zlog_debug(  				"%s: AS-External %u route remove %s cost %u(%u) nh %u", -				__PRETTY_FUNCTION__, +				__func__,  				route->path.type == OSPF6_PATH_TYPE_EXTERNAL1  					? 1  					: 2, diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index 891421b7e8..85d02c186b 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -373,7 +373,7 @@ void ospf6_flood_interface(struct ospf6_neighbor *from, struct ospf6_lsa *lsa,  			if (is_debug)  				zlog_debug(  					"%s: Send LSA %s (age %d) update now", -					__PRETTY_FUNCTION__, lsa->name, +					__func__, lsa->name,  					ntohs(lsa->header->age));  			ospf6_lsupdate_send_neighbor_now(on, lsa);  			continue; diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index 192e6356b1..9c239b75ff 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -1022,8 +1022,9 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread)  	 */  	if (oa->intra_prefix_originate) {  		if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX)) -			zlog_debug("%s: Re-originate intra prefix LSA, Current full nbrs %u", -				   __PRETTY_FUNCTION__, oa->full_nbrs); +			zlog_debug( +				"%s: Re-originate intra prefix LSA, Current full nbrs %u", +				__func__, oa->full_nbrs);  		if (old)  			ospf6_lsa_purge_multi_ls_id(oa, old);  		oa->intra_prefix_originate = 0; @@ -1401,9 +1402,10 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,  			if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) {  				prefix2str(&old_route->prefix, buf,  					   sizeof(buf)); -				zlog_debug("%s: route %s cost old %u new %u is not same, replace route", -					   __PRETTY_FUNCTION__, buf, -					   o_path->cost, route->path.cost); +				zlog_debug( +					"%s: route %s cost old %u new %u is not same, replace route", +					__func__, buf, o_path->cost, +					route->path.cost);  			}  			/* Remove selected current path's nh from @@ -1458,10 +1460,11 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,  				if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) {  					prefix2str(&old_route->prefix, buf,  						   sizeof(buf)); -					zlog_debug("%s: route %s old cost %u new cost %u, delete old entry.", -						   __PRETTY_FUNCTION__, buf, -						   old_route->path.cost, -						   route->path.cost); +					zlog_debug( +						"%s: route %s old cost %u new cost %u, delete old entry.", +						__func__, buf, +						old_route->path.cost, +						route->path.cost);  				}  				if (oa->route_table->hook_remove)  					ospf6_route_remove(old_route, @@ -1516,13 +1519,13 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,  						   sizeof(buf));  					zlog_debug(  						"%s: route %s %p another path added with nh %u, effective paths %u nh %u", -						__PRETTY_FUNCTION__, buf, +						__func__, buf,  						(void *)old_route,  						listcount(ecmp_path->nh_list), -						old_route->paths ? -						listcount(old_route->paths) : 0, +						old_route->paths ? listcount( +							old_route->paths) +								 : 0,  						listcount(old_route->nh_list)); -  				}  			} else {  				list_delete_all_node(o_path->nh_list); @@ -1540,9 +1543,9 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,  							oa->spf_table);  				if (ls_entry == NULL) {  					if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) -						zlog_debug("%s: ls_prfix %s ls_entry not found.", -							   __PRETTY_FUNCTION__, -							   buf); +						zlog_debug( +							"%s: ls_prfix %s ls_entry not found.", +							__func__, buf);  					continue;  				}  				lsa = ospf6_lsdb_lookup(o_path->origin.type, @@ -1559,9 +1562,9 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,  						o_path->origin.id, &adv_prefix);  						prefix2str(&adv_prefix, buf,  							   sizeof(buf)); -						zlog_debug("%s: adv_router %s lsa not found", -							   __PRETTY_FUNCTION__, -							   buf); +						zlog_debug( +							"%s: adv_router %s lsa not found", +							__func__, buf);  					}  					continue;  				} @@ -1587,12 +1590,13 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,  			if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) {  				prefix2str(&route->prefix, buf, sizeof(buf)); -				zlog_debug("%s: route %s %p with final effective paths %u nh%u", -					   __PRETTY_FUNCTION__, buf, -					   (void *)old_route, -					   old_route->paths ? -					   listcount(old_route->paths) : 0, -					   listcount(old_route->nh_list)); +				zlog_debug( +					"%s: route %s %p with final effective paths %u nh%u", +					__func__, buf, (void *)old_route, +					old_route->paths +						? listcount(old_route->paths) +						: 0, +					listcount(old_route->nh_list));  			}  			/* used in intra_route_calculation() to add to @@ -1784,7 +1788,7 @@ static void ospf6_intra_prefix_lsa_remove_update_route(struct ospf6_lsa *lsa,  			prefix2str(&route->prefix, buf, sizeof(buf));  			zlog_debug(  				"%s: route %s path found with cost %u nh %u to remove.", -				__PRETTY_FUNCTION__, buf, o_path->cost, +				__func__, buf, o_path->cost,  				listcount(o_path->nh_list));  		} @@ -1820,11 +1824,10 @@ static void ospf6_intra_prefix_lsa_remove_update_route(struct ospf6_lsa *lsa,  		if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) {  			prefix2str(&route->prefix, buf, sizeof(buf)); -			zlog_debug("%s: route %s update paths %u nh %u", -				   __PRETTY_FUNCTION__, buf, -				   route->paths ? listcount(route->paths) : 0, -				   route->nh_list ? listcount(route->nh_list) -				   : 0); +			zlog_debug( +				"%s: route %s update paths %u nh %u", __func__, +				buf, route->paths ? listcount(route->paths) : 0, +				route->nh_list ? listcount(route->nh_list) : 0);  		}  		/* Update Global Route table and diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index 524017a31e..b0fe890d33 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -1089,7 +1089,7 @@ void ospf6_remove_temp_router_lsa(struct ospf6_area *area)  		if (IS_OSPF6_DEBUG_SPF(PROCESS))  			zlog_debug(  				"%s Remove LSA %s lsa->lock %u lsdb count %u", -				__PRETTY_FUNCTION__, lsa->name, lsa->lock, +				__func__, lsa->name, lsa->lock,  				area->temp_router_lsa_lsdb->count);  		ospf6_lsdb_remove(lsa, area->temp_router_lsa_lsdb);  	}  | 
