summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-netlink/local-addresses.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-netlink/local-addresses.c')
-rw-r--r--src/libsystemd/sd-netlink/local-addresses.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/libsystemd/sd-netlink/local-addresses.c b/src/libsystemd/sd-netlink/local-addresses.c
index 81e55b6d9f..5467ba432f 100644
--- a/src/libsystemd/sd-netlink/local-addresses.c
+++ b/src/libsystemd/sd-netlink/local-addresses.c
@@ -1,23 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-/***
- This file is part of systemd.
-
- Copyright 2008-2011 Lennart Poettering
- Copyright 2014 Tom Gundersen
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
#include "sd-netlink.h"
@@ -158,8 +139,7 @@ int local_addresses(sd_netlink *context, int ifindex, int af, struct local_addre
qsort_safe(list, n_list, sizeof(struct local_address), address_compare);
- *ret = list;
- list = NULL;
+ *ret = TAKE_PTR(list);
return (int) n_list;
}
@@ -271,8 +251,7 @@ int local_gateways(sd_netlink *context, int ifindex, int af, struct local_addres
if (n_list > 0)
qsort(list, n_list, sizeof(struct local_address), address_compare);
- *ret = list;
- list = NULL;
+ *ret = TAKE_PTR(list);
return (int) n_list;
}