diff options
author | David Tardon <dtardon@redhat.com> | 2022-08-09 14:35:15 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2022-09-13 08:13:27 +0200 |
commit | 995340074e554b4bf4a0fdb0cb7436692c5a4ffd (patch) | |
tree | ca3ee001db3e608ee80478f42fea9c3b409f1b7b /src/network/tc/netem.c | |
parent | Merge pull request #23087 from yuwata/udev-watch (diff) | |
download | systemd-995340074e554b4bf4a0fdb0cb7436692c5a4ffd.tar.xz systemd-995340074e554b4bf4a0fdb0cb7436692c5a4ffd.zip |
tree-wide: use ASSERT_PTR more
Diffstat (limited to 'src/network/tc/netem.c')
-rw-r--r-- | src/network/tc/netem.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/network/tc/netem.c b/src/network/tc/netem.c index d4c452675e..6a63221c3a 100644 --- a/src/network/tc/netem.c +++ b/src/network/tc/netem.c @@ -61,7 +61,7 @@ int config_parse_network_emulator_delay( void *userdata) { _cleanup_(qdisc_free_or_set_invalidp) QDisc *qdisc = NULL; - Network *network = data; + Network *network = ASSERT_PTR(data); NetworkEmulator *ne; usec_t u; int r; @@ -69,7 +69,6 @@ int config_parse_network_emulator_delay( assert(filename); assert(lvalue); assert(rvalue); - assert(data); r = qdisc_new_static(QDISC_KIND_NETEM, network, filename, section_line, &qdisc); if (r == -ENOMEM) @@ -123,7 +122,7 @@ int config_parse_network_emulator_rate( void *userdata) { _cleanup_(qdisc_free_or_set_invalidp) QDisc *qdisc = NULL; - Network *network = data; + Network *network = ASSERT_PTR(data); NetworkEmulator *ne; uint32_t rate; int r; @@ -131,7 +130,6 @@ int config_parse_network_emulator_rate( assert(filename); assert(lvalue); assert(rvalue); - assert(data); r = qdisc_new_static(QDISC_KIND_NETEM, network, filename, section_line, &qdisc); if (r == -ENOMEM) @@ -184,14 +182,13 @@ int config_parse_network_emulator_packet_limit( void *userdata) { _cleanup_(qdisc_free_or_set_invalidp) QDisc *qdisc = NULL; - Network *network = data; + Network *network = ASSERT_PTR(data); NetworkEmulator *ne; int r; assert(filename); assert(lvalue); assert(rvalue); - assert(data); r = qdisc_new_static(QDISC_KIND_NETEM, network, filename, section_line, &qdisc); if (r == -ENOMEM) |