diff options
Diffstat (limited to 'src/network/tc/tbf.c')
-rw-r--r-- | src/network/tc/tbf.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/network/tc/tbf.c b/src/network/tc/tbf.c index 2aca8c1f13..d4344908d9 100644 --- a/src/network/tc/tbf.c +++ b/src/network/tc/tbf.c @@ -123,7 +123,7 @@ int config_parse_token_bucket_filter_size( void *userdata) { _cleanup_(qdisc_free_or_set_invalidp) QDisc *qdisc = NULL; - Network *network = data; + Network *network = ASSERT_PTR(data); TokenBucketFilter *tbf; uint64_t k; int r; @@ -131,7 +131,6 @@ int config_parse_token_bucket_filter_size( assert(filename); assert(lvalue); assert(rvalue); - assert(data); r = qdisc_new_static(QDISC_KIND_TBF, network, filename, section_line, &qdisc); if (r == -ENOMEM) @@ -197,7 +196,7 @@ int config_parse_token_bucket_filter_rate( void *userdata) { _cleanup_(qdisc_free_or_set_invalidp) QDisc *qdisc = NULL; - Network *network = data; + Network *network = ASSERT_PTR(data); TokenBucketFilter *tbf; uint64_t k, *p; int r; @@ -205,7 +204,6 @@ int config_parse_token_bucket_filter_rate( assert(filename); assert(lvalue); assert(rvalue); - assert(data); r = qdisc_new_static(QDISC_KIND_TBF, network, filename, section_line, &qdisc); if (r == -ENOMEM) @@ -259,7 +257,7 @@ int config_parse_token_bucket_filter_latency( void *userdata) { _cleanup_(qdisc_free_or_set_invalidp) QDisc *qdisc = NULL; - Network *network = data; + Network *network = ASSERT_PTR(data); TokenBucketFilter *tbf; usec_t u; int r; @@ -267,7 +265,6 @@ int config_parse_token_bucket_filter_latency( assert(filename); assert(lvalue); assert(rvalue); - assert(data); r = qdisc_new_static(QDISC_KIND_TBF, network, filename, section_line, &qdisc); if (r == -ENOMEM) |