diff --git a/src/core/device.c b/src/core/device.c index 91ffe458dc0..85b94e2d60c 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -85,7 +85,9 @@ static int device_set_sysfs(Device *d, const char *sysfs) { Unit *u = UNIT(ASSERT_PTR(d)); int r; - if (streq_ptr(d->sysfs, sysfs)) + assert(sysfs); + + if (path_equal(d->sysfs, sysfs)) return 0; Hashmap **devices = &u->manager->devices_by_sysfs;