summaryrefslogtreecommitdiff
path: root/src/tmpfiles/tmpfiles.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 19:13:53 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 19:17:24 +0100
commit8d3d7072e609ef0e0fb37e1d19a29307d58146c3 (patch)
tree96a7628cd8bbf315bd9ca55e87eb2dd3cb50e054 /src/tmpfiles/tmpfiles.c
parentf647962d64e844689f3e2acfce6102fc47e76df2 (diff)
treewide: a few more log_*_errno + return simplifications
The one in tmpfiles.c:create_item() even looks like it fixes a bug.
Diffstat (limited to 'src/tmpfiles/tmpfiles.c')
-rw-r--r--src/tmpfiles/tmpfiles.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 1a4f02db3..45d31fb5d 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -667,10 +667,8 @@ static int create_item(Item *i) {
if (r < 0) {
struct stat a, b;
- if (r != -EEXIST) {
- log_error_errno(r, "Failed to copy files to %s: %m", i->path);
- return -r;
- }
+ if (r != -EEXIST)
+ return log_error_errno(r, "Failed to copy files to %s: %m", i->path);
if (stat(i->argument, &a) < 0) {
log_error("stat(%s) failed: %m", i->argument);
@@ -1519,8 +1517,7 @@ static int read_config_file(const char *fn, bool ignore_enoent) {
if (ignore_enoent && r == -ENOENT)
return 0;
- log_error_errno(r, "Failed to open '%s', ignoring: %m", fn);
- return r;
+ return log_error_errno(r, "Failed to open '%s', ignoring: %m", fn);
}
FOREACH_LINE(line, f, break) {