Makes sense. Made some changes now.

On Mon, Mar 9, 2015 at 6:06 PM, Lennart Poettering
<[email protected]> wrote:
> On Mon, 09.03.15 10:00, Tom Gundersen ([email protected]) wrote:
>
>> +static void event_queue_update(void) {
>> +        if (!udev_list_node_is_empty(&event_list)) {
>> +                int fd;
>> +
>> +                fd = open("/run/udev/queue", 
>> O_WRONLY|O_CREAT|O_CLOEXEC|O_TRUNC|O_NOFOLLOW, 0444);
>> +                if (fd >= 0)
>> +                       close(fd);
>
> Isn't this a candidate for touch() or touch_file()?
>
>> +        } else
>> +                unlink("/run/udev/queue");
>> +}
>
> Not that it would matter much, but I think we should generally prefix
> syscalls whose return code we ignore knowingly with a (void) cast, so
> that Coverity doesn't ever get the idea we'd ignore the return value
> by accident...
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
> _______________________________________________
> systemd-devel mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to