From 639caccfebc9871d913d7b075430bdce0d60f2d3 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 5 Aug 2021 16:29:52 +0300 Subject: [PATCH] bgpd: Fix misleading comments for some parts Mostly just retrun => return and misleading comments at all. Signed-off-by: Donatas Abraitis --- bgpd/bgp_community.c | 4 +--- bgpd/bgp_ecommunity.c | 2 +- bgpd/bgp_lcommunity.c | 2 +- bgpd/bgp_snmp.c | 2 +- lib/plist.c | 2 +- ripd/rip_snmp.c | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/bgpd/bgp_community.c b/bgpd/bgp_community.c index e91166449a..b187fd9736 100644 --- a/bgpd/bgp_community.c +++ b/bgpd/bgp_community.c @@ -544,7 +544,7 @@ struct community *community_dup(struct community *com) return new; } -/* Retrun string representation of communities attribute. */ +/* Return string representation of communities attribute. */ char *community_str(struct community *com, bool make_json) { if (!com) @@ -594,8 +594,6 @@ bool community_match(const struct community *com1, const struct community *com2) return false; } -/* If two aspath have same value then return 1 else return 0. This - function is used by hash package. */ bool community_cmp(const struct community *com1, const struct community *com2) { if (com1 == NULL && com2 == NULL) diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c index 3a951e6e80..bd3383b753 100644 --- a/bgpd/bgp_ecommunity.c +++ b/bgpd/bgp_ecommunity.c @@ -273,7 +273,7 @@ struct ecommunity *ecommunity_dup(struct ecommunity *ecom) return new; } -/* Retrun string representation of communities attribute. */ +/* Return string representation of ecommunities attribute. */ char *ecommunity_str(struct ecommunity *ecom) { if (!ecom->str) diff --git a/bgpd/bgp_lcommunity.c b/bgpd/bgp_lcommunity.c index 6121c4905f..9d81968789 100644 --- a/bgpd/bgp_lcommunity.c +++ b/bgpd/bgp_lcommunity.c @@ -287,7 +287,7 @@ void lcommunity_unintern(struct lcommunity **lcom) } } -/* Retrun string representation of communities attribute. */ +/* Return string representation of lcommunities attribute. */ char *lcommunity_str(struct lcommunity *lcom, bool make_json) { if (!lcom) diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c index 4baa730c8d..868801c14e 100644 --- a/bgpd/bgp_snmp.c +++ b/bgpd/bgp_snmp.c @@ -326,7 +326,7 @@ static uint8_t *bgpVersion(struct variable *v, oid name[], size_t *length, == MATCH_FAILED) return NULL; - /* Retrun BGP version. Zebra bgpd only support version 4. */ + /* Return BGP version. Zebra bgpd only support version 4. */ version = (0x80 >> (BGP_VERSION_4 - 1)); /* Return octet string length 1. */ diff --git a/lib/plist.c b/lib/plist.c index 63ae579796..2f9f06f43b 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -882,7 +882,7 @@ static void __attribute__((unused)) prefix_list_print(struct prefix_list *plist) } } -/* Retrun 1 when plist already include pentry policy. */ +/* Return 1 when plist already include pentry policy. */ static struct prefix_list_entry * prefix_entry_dup_check(struct prefix_list *plist, struct prefix_list_entry *new) { diff --git a/ripd/rip_snmp.c b/ripd/rip_snmp.c index d49d360b7e..824cbd8cf1 100644 --- a/ripd/rip_snmp.c +++ b/ripd/rip_snmp.c @@ -166,7 +166,7 @@ static uint8_t *rip2Globals(struct variable *v, oid name[], size_t *length, if (!rip) return NULL; - /* Retrun global counter. */ + /* Return global counter. */ switch (v->magic) { case RIP2GLOBALROUTECHANGES: return SNMP_INTEGER(rip->counters.route_changes); -- 2.39.5