summaryrefslogtreecommitdiff
path: root/src/udev/udev-ctrl.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/udev/udev-ctrl.c
parent6d64cb0625691e2b9eda8babe07ac8281f9467ee (diff)
downloadsystemd-995340074e554b4bf4a0fdb0cb7436692c5a4ffd.tar.gz
tree-wide: use ASSERT_PTR more
Diffstat (limited to 'src/udev/udev-ctrl.c')
-rw-r--r--src/udev/udev-ctrl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/udev/udev-ctrl.c b/src/udev/udev-ctrl.c
index cb71dc0929..c8b773611f 100644
--- a/src/udev/udev-ctrl.c
+++ b/src/udev/udev-ctrl.c
@@ -217,13 +217,11 @@ static int udev_ctrl_connection_event_handler(sd_event_source *s, int fd, uint32
}
static int udev_ctrl_event_handler(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
- UdevCtrl *uctrl = userdata;
+ UdevCtrl *uctrl = ASSERT_PTR(userdata);
_cleanup_close_ int sock = -1;
struct ucred ucred;
int r;
- assert(uctrl);
-
sock = accept4(fd, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK);
if (sock < 0) {
if (ERRNO_IS_ACCEPT_AGAIN(errno))