diff options
Diffstat (limited to 'src/network/tc/qdisc.c')
-rw-r--r-- | src/network/tc/qdisc.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/network/tc/qdisc.c b/src/network/tc/qdisc.c index 1a84e8b0f5..7016dc1877 100644 --- a/src/network/tc/qdisc.c +++ b/src/network/tc/qdisc.c @@ -126,11 +126,7 @@ int qdisc_new_static(QDiscKind kind, Network *network, const char *filename, uns qdisc->network = network; qdisc->section = TAKE_PTR(n); - r = ordered_hashmap_ensure_allocated(&network->tc_by_section, &network_config_hash_ops); - if (r < 0) - return r; - - r = ordered_hashmap_put(network->tc_by_section, qdisc->section, TC(qdisc)); + r = ordered_hashmap_ensure_put(&network->tc_by_section, &network_config_hash_ops, qdisc->section, TC(qdisc)); if (r < 0) return r; |