From 995340074e554b4bf4a0fdb0cb7436692c5a4ffd Mon Sep 17 00:00:00 2001 From: David Tardon Date: Tue, 9 Aug 2022 14:35:15 +0200 Subject: tree-wide: use ASSERT_PTR more --- src/network/networkd-ipv4acd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/network/networkd-ipv4acd.c') diff --git a/src/network/networkd-ipv4acd.c b/src/network/networkd-ipv4acd.c index a633575444..4127657ebd 100644 --- a/src/network/networkd-ipv4acd.c +++ b/src/network/networkd-ipv4acd.c @@ -116,12 +116,11 @@ static int dhcp4_address_on_conflict(Link *link, Address *address) { } static void on_acd(sd_ipv4acd *acd, int event, void *userdata) { - Address *address = userdata; + Address *address = ASSERT_PTR(userdata); Link *link; int r; assert(acd); - assert(address); assert(address->acd == acd); assert(address->link); assert(address->family == AF_INET); @@ -170,10 +169,9 @@ static void on_acd(sd_ipv4acd *acd, int event, void *userdata) { } static int ipv4acd_check_mac(sd_ipv4acd *acd, const struct ether_addr *mac, void *userdata) { - Manager *m = userdata; + Manager *m = ASSERT_PTR(userdata); struct hw_addr_data hw_addr; - assert(m); assert(mac); hw_addr = (struct hw_addr_data) { -- cgit v1.2.3