summaryrefslogtreecommitdiff
path: root/tests/lib/test_srcdest_table.c
AgeCommit message (Collapse)Author
2022-05-08*: Avoid casting to the same type as on the leftDonatas Abraitis
Just not necessary. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-03*: remove the checking returned value for hash_get()anlan_cs
Firstly, *keep no change* for `hash_get()` with NULL `alloc_func`. Only focus on cases with non-NULL `alloc_func` of `hash_get()`. Since `hash_get()` with non-NULL `alloc_func` parameter shall not fail, just ignore the returned value of it. The returned value must not be NULL. So in this case, remove the unnecessary checking NULL or not for the returned value and add `void` in front of it. Importantly, also *keep no change* for the two cases with non-NULL `alloc_func` - 1) Use `assert(<returned_data> == <searching_data>)` to ensure it is a created node, not a found node. Refer to `isis_vertex_queue_insert()` of isisd, there are many examples of this case in isid. 2) Use `<returned_data> != <searching_data>` to judge it is a found node, then free <searching_data>. Refer to `aspath_intern()` of bgpd, there are many examples of this case in bgpd. Here, <returned_data> is the returned value from `hash_get()`, and <searching_data> is the data, which is to be put into hash table. Signed-off-by: anlan_cs <vic.lan@pica8.com>
2020-10-17*: Create/Use accessor functions for lock countDonald Sharp
Create appropriate accessor functions for the rn->lock data. We should be accessing this data through accessor functions since it is private data to the data structure. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-09-21*: Remove solaris from FRRDonald Sharp
The Solaris code has gone through a deprecation cycle. No-one has said anything to us and worse of all we don't have any test systems running Solaris to know if we are making changes that are breaking on Solaris. Remove it from the system so we can clean up a bit. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-04-08*: Do not cast to the same typeDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-03-25*: use the current project name (FRRouting)Lou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2019-05-14lib: hashing functions should take const argumentsQuentin Young
It doesn't make much sense for a hash function to modify its argument, so const the hash input. BGP does it in a couple places, those cast away the const. Not great but not any worse than it was. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-02-25*: return bool from boolean functionsQuentin Young
Not 1 or 0. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-02-25*: Rename backet to bucketTim Bray
Presume typo from original author Signed-off-by: Tim Bray <tim@kooky.org>
2018-11-26tests: fix warning related to change in the hash APIRenato Westphal
The hash_cmp functions need to return bool since commit 74df8d6d9d6. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-09-13bgpd lib ospf6d pbrd tests zebra: shadowing fixesF. Aragon
This fixes all remaining local variable shadowing cases Signed-off-by: F. Aragon <paco@voltanet.io>
2018-07-25tests: Fix const changeDonald Sharp
Some of the parameters for lib/srcdest.. have changed to consts, make the test cases respect that. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-12tests: align with srcdest lib changes, remove bgp binaryMark Stapp
Align the srcdest table test with recent api changes that use 'const' more strictly. Remove test_bgp_table binary - looks as if it was committed by mistake. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2018-06-19eigrpd, lib, tests, vtysh: security (cppcheck)paco
Signed-off-by: F. Aragon <paco@voltanet.io>
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-12tests: update prng to return better pseudo random numbersChristian Franke
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-07-01*: update hash_create(), hash_create_size()Quentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-15*: make consistent & update GPLv2 file headersDavid Lamparter
The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-02-08tests: reorganize tests hierarchicallyChristian Franke
Signed-off-by: Christian Franke <chris@opensourcerouting.org>