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.
This commit is contained in:
Lennart Poettering
2015-09-09 14:58:26 +02:00
parent 9c00a6adfa
commit 94c156cd45
7 changed files with 67 additions and 50 deletions
+6 -4
View File
@@ -96,8 +96,9 @@ static int generate_mask_symlinks(void) {
return log_oom();
if (symlink("/dev/null", p) < 0) {
log_error_errno(errno, "Failed to create mask symlink %s: %m", p);
r = -errno;
r = log_error_errno(errno,
"Failed to create mask symlink %s: %m",
p);
}
}
@@ -125,8 +126,9 @@ static int generate_wants_symlinks(void) {
mkdir_parents_label(p, 0755);
if (symlink(f, p) < 0) {
log_error_errno(errno, "Failed to create wants symlink %s: %m", p);
r = -errno;
r = log_error_errno(errno,
"Failed to create wants symlink %s: %m",
p);
}
}