diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-02-16 07:00:22 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-02-19 15:00:00 +0100 |
commit | cb51ee7a6e537da5706b4eb4a6d673ebe9654ceb (patch) | |
tree | ab4f7be9a4bccf1afea8705e018a424afeee1389 /src/udev/udev-watch.c | |
parent | login,user-sessions: always warn when we fail to remove nologin file (diff) | |
download | systemd-cb51ee7a6e537da5706b4eb4a6d673ebe9654ceb.tar.xz systemd-cb51ee7a6e537da5706b4eb4a6d673ebe9654ceb.zip |
Add some handling to remaining unlinkat calls
Coverity now started warning about this ("Calling unlinkat without checking
return value (as is done elsewhere 12 out of 15 times).", and it is right:
most of the time we should at list print a log message so people can figure
out something is wrong when this happens.
v2:
- use warning level in journald too (this is unlikely to happen ever, so it
should be safe to something that is visible by default).
Diffstat (limited to 'src/udev/udev-watch.c')
-rw-r--r-- | src/udev/udev-watch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/udev-watch.c b/src/udev/udev-watch.c index 351cb6345a..61179ce03d 100644 --- a/src/udev/udev-watch.c +++ b/src/udev/udev-watch.c @@ -79,7 +79,7 @@ void udev_watch_restore(struct udev *udev) { udev_watch_begin(udev, dev); udev_device_unref(dev); unlink: - unlinkat(dirfd(dir), ent->d_name, 0); + (void) unlinkat(dirfd(dir), ent->d_name, 0); } closedir(dir); |