diff options
author | Susant Sahani <ssahani@vmware.com> | 2021-01-17 12:07:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-17 12:07:02 +0100 |
commit | ebffea2a253e7f5a38b91d826570d68fa56dbda7 (patch) | |
tree | e9e267035a1f72224f1171fb6aed95d92e47f9d0 /src/network/tc/qdisc.c | |
parent | Merge pull request #18230 from ssahani/macvlan-bcqueuelen (diff) | |
download | systemd-ebffea2a253e7f5a38b91d826570d68fa56dbda7.tar.xz systemd-ebffea2a253e7f5a38b91d826570d68fa56dbda7.zip |
network: Use ordered_hashmap_ensure_put (#18233)
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; |