logind: fix sysfs change trigger code

We can't create files in sysfs, hence don't bother. Also if we ignore
the return value, do so explicitly by casting to void.
This commit is contained in:
Lennart Poettering 2017-11-22 12:10:39 +01:00
parent 98bad05e75
commit ddd59d0c7f

View file

@ -1282,7 +1282,7 @@ static int trigger_device(Manager *m, struct udev_device *d) {
if (!t)
return -ENOMEM;
write_string_file(t, "change", WRITE_STRING_FILE_CREATE);
(void) write_string_file(t, "change", 0);
}
return 0;