summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
author0xAX <0xAX@users.noreply.github.com>2016-10-10 20:51:33 +0300
committerLennart Poettering <lennart@poettering.net>2016-10-10 19:51:33 +0200
commitc76cf844d6e59ca5ac5eb3e6c60b3e501815c5b8 (patch)
tree75e94503e2a3249f97fa9acfbd4bb7a83d1aa991 /src/udev
parenta0f72a24e0b3454034a87d8a4a4bfd36c34f1d49 (diff)
tree-wide: pass return value of make_null_stdio() to warning instead of errno (#4328)
as @poettering suggested in the #4320
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/udevd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 6000d9c7ec..535d317c27 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1738,9 +1738,12 @@ int main(int argc, char *argv[]) {
log_info("starting version " VERSION);
/* connect /dev/null to stdin, stdout, stderr */
- if (log_get_max_level() < LOG_DEBUG)
- if (make_null_stdio() < 0)
- log_warning_errno(errno, "Failed to redirect standard streams to /dev/null: %m");
+ if (log_get_max_level() < LOG_DEBUG) {
+ r = make_null_stdio();
+ if (r < 0)
+ log_warning_errno(r, "Failed to redirect standard streams to /dev/null: %m");
+ }
+
pid = fork();