summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-dhcp-server-bus.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/network/networkd-dhcp-server-bus.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/network/networkd-dhcp-server-bus.c')
-rw-r--r--src/network/networkd-dhcp-server-bus.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/network/networkd-dhcp-server-bus.c b/src/network/networkd-dhcp-server-bus.c
index cc132da8b7..e3397c3208 100644
--- a/src/network/networkd-dhcp-server-bus.c
+++ b/src/network/networkd-dhcp-server-bus.c
@@ -17,13 +17,12 @@ static int property_get_leases(
sd_bus_message *reply,
void *userdata,
sd_bus_error *error) {
- Link *l = userdata;
+ Link *l = ASSERT_PTR(userdata);
sd_dhcp_server *s;
DHCPLease *lease;
int r;
assert(reply);
- assert(l);
s = l->dhcp_server;
if (!s)
@@ -96,9 +95,7 @@ static int dhcp_server_emit_changed(Link *link, const char *property, ...) {
}
void dhcp_server_callback(sd_dhcp_server *s, uint64_t event, void *data) {
- Link *l = data;
-
- assert(l);
+ Link *l = ASSERT_PTR(data);
if (event & SD_DHCP_SERVER_EVENT_LEASE_CHANGED)
(void) dhcp_server_emit_changed(l, "Leases", NULL);