From 0397d7b2be76eac1a446f80be01b6a0b06b490ab Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 6 Oct 2022 19:34:09 +0200 Subject: [PATCH] alsa-udev: avoid meth with void pointers --- spa/plugins/alsa/alsa-udev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spa/plugins/alsa/alsa-udev.c b/spa/plugins/alsa/alsa-udev.c index c088fa95b..1a48a27ef 100644 --- a/spa/plugins/alsa/alsa-udev.c +++ b/spa/plugins/alsa/alsa-udev.c @@ -675,8 +675,8 @@ static void impl_on_notify_events(struct spa_source *source) struct device *device; event = (const struct inotify_event *) p; - spa_assert_se(e - p >= (ptrdiff_t)sizeof(struct inotify_event) && - e - p - sizeof(struct inotify_event) >= event->len && + spa_assert_se(SPA_PTRDIFF(e, p) >= (ptrdiff_t)sizeof(struct inotify_event) && + SPA_PTRDIFF(e, p) - sizeof(struct inotify_event) >= event->len && "bad event from kernel"); /* Device becomes accessible or not busy */