mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
generators: fix parameters naming in symlink helper
Coverity gets confused because the names were swapped. The parameters
are all passed in the right position, so there's no functional issue,
but the naming is confusing and trips static analyzers, so fix it.
CID#1621624
Follow-up for 8a9ab3dbbc
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
775a31bdfa
commit
892838911b
@@ -26,11 +26,11 @@
|
||||
#include "tmpfile-util.h"
|
||||
#include "unit-name.h"
|
||||
|
||||
static int symlink_unless_exists(const char *to, const char *from) {
|
||||
(void) mkdir_parents(from, 0755);
|
||||
static int symlink_unless_exists(const char *from, const char *to) {
|
||||
(void) mkdir_parents(to, 0755);
|
||||
|
||||
if (symlink(to, from) < 0 && errno != EEXIST)
|
||||
return log_error_errno(errno, "Failed to create symlink %s: %m", from);
|
||||
if (symlink(from, to) < 0 && errno != EEXIST)
|
||||
return log_error_errno(errno, "Failed to create symlink %s: %m", to);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user