summaryrefslogtreecommitdiff
path: root/tests/lib/test_srcdest_table.c
diff options
context:
space:
mode:
authorpaco <paco@voltanet.io>2018-06-19 10:40:56 +0200
committerpaco <paco@voltanet.io>2018-06-19 10:40:56 +0200
commit6d10727ac13e5b80c3d5f8b42acf17cebb3f9d5a (patch)
treed6cbf6a8295df6c4e414331c69df515666e8d5a8 /tests/lib/test_srcdest_table.c
parented892e530d2d20706973759fa81a90041d82b466 (diff)
eigrpd, lib, tests, vtysh: security (cppcheck)
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'tests/lib/test_srcdest_table.c')
-rw-r--r--tests/lib/test_srcdest_table.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/lib/test_srcdest_table.c b/tests/lib/test_srcdest_table.c
index 408f4e0581..04e85435d1 100644
--- a/tests/lib/test_srcdest_table.c
+++ b/tests/lib/test_srcdest_table.c
@@ -104,9 +104,7 @@ static unsigned int log_key(void *data)
static int log_cmp(const void *a, const void *b)
{
- if (a == NULL && b != NULL)
- return 0;
- if (b == NULL && a != NULL)
+ if (a == NULL || b == NULL)
return 0;
return !memcmp(a, b, 2 * sizeof(struct prefix));