summaryrefslogtreecommitdiffstats
path: root/src/libsystemd-network/sd-ipv4ll.c
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2022-08-09 14:35:15 +0200
committerDavid Tardon <dtardon@redhat.com>2022-09-13 08:13:27 +0200
commit995340074e554b4bf4a0fdb0cb7436692c5a4ffd (patch)
treeca3ee001db3e608ee80478f42fea9c3b409f1b7b /src/libsystemd-network/sd-ipv4ll.c
parentMerge pull request #23087 from yuwata/udev-watch (diff)
downloadsystemd-995340074e554b4bf4a0fdb0cb7436692c5a4ffd.tar.xz
systemd-995340074e554b4bf4a0fdb0cb7436692c5a4ffd.zip
tree-wide: use ASSERT_PTR more
Diffstat (limited to 'src/libsystemd-network/sd-ipv4ll.c')
-rw-r--r--src/libsystemd-network/sd-ipv4ll.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libsystemd-network/sd-ipv4ll.c b/src/libsystemd-network/sd-ipv4ll.c
index 155c1a5de6..4b0fac3cf1 100644
--- a/src/libsystemd-network/sd-ipv4ll.c
+++ b/src/libsystemd-network/sd-ipv4ll.c
@@ -313,12 +313,11 @@ static void ipv4ll_client_notify(sd_ipv4ll *ll, int event) {
}
void ipv4ll_on_acd(sd_ipv4acd *acd, int event, void *userdata) {
- sd_ipv4ll *ll = userdata;
+ sd_ipv4ll *ll = ASSERT_PTR(userdata);
IPV4LL_DONT_DESTROY(ll);
int r;
assert(acd);
- assert(ll);
switch (event) {
@@ -358,9 +357,7 @@ error:
}
static int ipv4ll_check_mac(sd_ipv4acd *acd, const struct ether_addr *mac, void *userdata) {
- sd_ipv4ll *ll = userdata;
-
- assert(ll);
+ sd_ipv4ll *ll = ASSERT_PTR(userdata);
if (ll->check_mac_callback)
return ll->check_mac_callback(ll, mac, ll->check_mac_userdata);