summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-route-metric.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-03-19 21:08:52 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-03-20 15:18:21 +0100
commit6a705f1234919c255cc230403ad6749edabf83be (patch)
tree325220dfa5cf279a7ce9af3babf04631d90fc2d2 /src/network/networkd-route-metric.c
parentbasic/string-util: use strdup_to() in string_extract_line() (diff)
downloadsystemd-6a705f1234919c255cc230403ad6749edabf83be.tar.xz
systemd-6a705f1234919c255cc230403ad6749edabf83be.zip
Replace strdup_or_null() by strdup_to()
I didn't know that this helper existed… It is very similar to strdup_to_full(), but all callers can actually be replaced by strdup_to(), which has more fitting semantics.
Diffstat (limited to 'src/network/networkd-route-metric.c')
-rw-r--r--src/network/networkd-route-metric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/networkd-route-metric.c b/src/network/networkd-route-metric.c
index 1bae893934..31a2bdea24 100644
--- a/src/network/networkd-route-metric.c
+++ b/src/network/networkd-route-metric.c
@@ -39,7 +39,7 @@ int route_metric_copy(const RouteMetric *src, RouteMetric *dest) {
} else
dest->metrics_set = NULL;
- return strdup_or_null(src->tcp_congestion_control_algo, &dest->tcp_congestion_control_algo);
+ return strdup_to(&dest->tcp_congestion_control_algo, src->tcp_congestion_control_algo);
}
void route_metric_hash_func(const RouteMetric *metric, struct siphash *state) {