diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2015-11-05 13:44:20 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2015-11-09 20:01:06 +0100 |
commit | e1427b138fbf7b7f13bb61187635b882be3ca2b2 (patch) | |
tree | b3ce451e25222b085aee42f70bcd8ae46386642b /src/udev | |
parent | coccinelle: additional errno.cocci hunk (diff) | |
download | systemd-e1427b138fbf7b7f13bb61187635b882be3ca2b2.tar.xz systemd-e1427b138fbf7b7f13bb61187635b882be3ca2b2.zip |
treewide: apply errno.cocci
with small manual cleanups for style.
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/udev-event.c | 4 | ||||
-rw-r--r-- | src/udev/udev-node.c | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c index 6b4bd31281..5d6542d3ad 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c @@ -441,9 +441,7 @@ static int spawn_exec(struct udev_event *event, execve(argv[0], argv, envp); /* exec failed */ - log_error_errno(errno, "failed to execute '%s' '%s': %m", argv[0], cmd); - - return -errno; + return log_error_errno(errno, "failed to execute '%s' '%s': %m", argv[0], cmd); } static void spawn_read(struct udev_event *event, diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c index afdeb0a21b..c2edf2c5cd 100644 --- a/src/udev/udev-node.c +++ b/src/udev/udev-node.c @@ -263,8 +263,7 @@ static int node_permissions_apply(struct udev_device *dev, bool apply, mode |= S_IFCHR; if (lstat(devnode, &stats) != 0) { - err = -errno; - log_debug_errno(errno, "can not stat() node '%s' (%m)", devnode); + err = log_debug_errno(errno, "can not stat() node '%s' (%m)", devnode); goto out; } |