diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2025-02-12 13:00:36 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-12 13:00:36 -0500 |
| commit | 9219fa39f2fd8ce5370170f84f709f07ff64609c (patch) | |
| tree | c161508f8b59f84b852a702e55d2f4f7fa79b90c /tests/lib/test_nexthop_iter.c | |
| parent | acd10af3fb213f24d53538300e785113932e87b9 (diff) | |
| parent | 84d0ab9896f090ea21c9e3396c837058d50dd9ed (diff) | |
Merge pull request #17649 from ariel-anieli/calloc-warns
tests: clear `-Wcalloc-transposed-args` warnings
Diffstat (limited to 'tests/lib/test_nexthop_iter.c')
| -rw-r--r-- | tests/lib/test_nexthop_iter.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/lib/test_nexthop_iter.c b/tests/lib/test_nexthop_iter.c index 33ff116890..b70ef5606c 100644 --- a/tests/lib/test_nexthop_iter.c +++ b/tests/lib/test_nexthop_iter.c @@ -62,7 +62,7 @@ static struct nexthop_chain *nexthop_chain_new(void) { struct nexthop_chain *rv; - rv = calloc(sizeof(*rv), 1); + rv = calloc(1, sizeof(*rv)); assert(rv); return rv; } @@ -71,7 +71,7 @@ static void nexthop_chain_add_top(struct nexthop_chain *nc) { struct nexthop *nh; - nh = calloc(sizeof(*nh), 1); + nh = calloc(1, sizeof(*nh)); assert(nh); if (nc->head.nexthop) { @@ -109,7 +109,7 @@ static void nexthop_chain_add_recursive(struct nexthop_chain *nc) { struct nexthop *nh; - nh = calloc(sizeof(*nh), 1); + nh = calloc(1, sizeof(*nh)); assert(nh); assert(nc->current_top); @@ -128,7 +128,7 @@ static void nexthop_chain_add_recursive_level(struct nexthop_chain *nc) { struct nexthop *nh; - nh = calloc(sizeof(*nh), 1); + nh = calloc(1, sizeof(*nh)); assert(nh); assert(nc->current_top); |
