]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Fix misleading comments for some parts
authorDonatas Abraitis <donatas.abraitis@gmail.com>
Thu, 5 Aug 2021 13:29:52 +0000 (16:29 +0300)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Thu, 5 Aug 2021 13:29:52 +0000 (16:29 +0300)
Mostly just retrun => return and misleading comments at all.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
bgpd/bgp_community.c
bgpd/bgp_ecommunity.c
bgpd/bgp_lcommunity.c
bgpd/bgp_snmp.c
lib/plist.c
ripd/rip_snmp.c

index e91166449a1fb5a0e6bf9bad4113f42269f90e04..b187fd973656bd4df1326af015394c850ffd6fa6 100644 (file)
@@ -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)
index 3a951e6e80c2ab1a42140086d7a02ef740542d2e..bd3383b753e7623eb5153dedbd6802b2b59774fa 100644 (file)
@@ -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)
index 6121c4905f7ae71cee02d07397c203b6b1c001d6..9d8196878992e111c23d391632c5ec4bd159d610 100644 (file)
@@ -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)
index 4baa730c8dacff6ca73e003e30f06583134e0817..868801c14e1857d7c012e514a3488aa520cace71 100644 (file)
@@ -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. */
index 63ae579796eb36038a5c724e6c6c6edc0ed7b29a..2f9f06f43b707ee8cb78fb0491f834fc88113905 100644 (file)
@@ -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)
 {
index d49d360b7ee70713e73eff97b7352d48cb82ab11..824cbd8cf152a789a6b2835e6e01c5e79774122c 100644 (file)
@@ -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);