Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9171 from FRRouting/mergify/bp/stable/8.0/pr-9039
bgpd: Do not check for NULL values for vni_hash_cmp() (backport #9039)
- Loading branch information
Showing
2 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// There is no need to test for null values in the hash compare | ||
// function as that we are guaranteed to send in data in | ||
// the hash compare functions. | ||
@@ | ||
identifier fn =~ "_hash_cmp"; | ||
type T; | ||
identifier p1; | ||
identifier p2; | ||
@@ | ||
|
||
?static | ||
T fn(...) | ||
{ | ||
... | ||
- if (p1 == NULL && p2 == NULL) | ||
- return ...; | ||
- if (p1 == NULL || p2 == NULL) | ||
- return ...; | ||
... | ||
} |