From 94c156cd452424ea59931920df2454d9da7cb774 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 9 Sep 2015 11:08:23 +0200 Subject: tree-wide: make use of log_error_errno() return value in more cases The previous coccinelle semantic patch that improved usage of log_error_errno()'s return value, only looked for log_error_errno() invocations with a single parameter after the error parameter. Update the patch to handle arbitrary numbers of additional arguments. --- src/core/namespace.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/core/namespace.c') diff --git a/src/core/namespace.c b/src/core/namespace.c index 0b85b859fa..5ff35b38fb 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -294,15 +294,15 @@ static int mount_kdbus(BindMount *m) { busnode = strjoina(root, "/bus"); if (mknod(busnode, (st.st_mode & ~07777) | 0600, st.st_rdev) < 0) { - log_error_errno(errno, "mknod() for %s failed: %m", busnode); - r = -errno; + r = log_error_errno(errno, "mknod() for %s failed: %m", + busnode); goto fail; } r = mount(m->path, busnode, NULL, MS_BIND, NULL); if (r < 0) { - log_error_errno(errno, "bind mount of %s failed: %m", m->path); - r = -errno; + r = log_error_errno(errno, "bind mount of %s failed: %m", + m->path); goto fail; } @@ -313,8 +313,8 @@ static int mount_kdbus(BindMount *m) { } if (mount(root, basepath, NULL, MS_MOVE, NULL) < 0) { - log_error_errno(errno, "bind mount of %s failed: %m", basepath); - r = -errno; + r = log_error_errno(errno, "bind mount of %s failed: %m", + basepath); goto fail; } -- cgit v1.2.3-54-g00ecf