Merge pull request #9302 from ton31337/fix/comments

bgpd: Fix misleading comments for some parts
This commit is contained in:
Mark Stapp 2021-08-05 14:39:38 -04:00 committed by GitHub
commit 6696b16bf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 8 deletions

View File

@ -544,7 +544,7 @@ struct community *community_dup(struct community *com)
return new; return new;
} }
/* Retrun string representation of communities attribute. */ /* Return string representation of communities attribute. */
char *community_str(struct community *com, bool make_json) char *community_str(struct community *com, bool make_json)
{ {
if (!com) if (!com)
@ -594,8 +594,6 @@ bool community_match(const struct community *com1, const struct community *com2)
return false; 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) bool community_cmp(const struct community *com1, const struct community *com2)
{ {
if (com1 == NULL && com2 == NULL) if (com1 == NULL && com2 == NULL)

View File

@ -273,7 +273,7 @@ struct ecommunity *ecommunity_dup(struct ecommunity *ecom)
return new; return new;
} }
/* Retrun string representation of communities attribute. */ /* Return string representation of ecommunities attribute. */
char *ecommunity_str(struct ecommunity *ecom) char *ecommunity_str(struct ecommunity *ecom)
{ {
if (!ecom->str) if (!ecom->str)

View 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) char *lcommunity_str(struct lcommunity *lcom, bool make_json)
{ {
if (!lcom) if (!lcom)

View File

@ -326,7 +326,7 @@ static uint8_t *bgpVersion(struct variable *v, oid name[], size_t *length,
== MATCH_FAILED) == MATCH_FAILED)
return NULL; 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)); version = (0x80 >> (BGP_VERSION_4 - 1));
/* Return octet string length 1. */ /* Return octet string length 1. */

View 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 * static struct prefix_list_entry *
prefix_entry_dup_check(struct prefix_list *plist, struct prefix_list_entry *new) prefix_entry_dup_check(struct prefix_list *plist, struct prefix_list_entry *new)
{ {

View File

@ -166,7 +166,7 @@ static uint8_t *rip2Globals(struct variable *v, oid name[], size_t *length,
if (!rip) if (!rip)
return NULL; return NULL;
/* Retrun global counter. */ /* Return global counter. */
switch (v->magic) { switch (v->magic) {
case RIP2GLOBALROUTECHANGES: case RIP2GLOBALROUTECHANGES:
return SNMP_INTEGER(rip->counters.route_changes); return SNMP_INTEGER(rip->counters.route_changes);