pid1: drop now-unused path parameter to resolve_template()
This commit is contained in:
parent
5a72417084
commit
23e8c79665
|
@ -2894,17 +2894,14 @@ int unit_add_two_dependencies(Unit *u, UnitDependency d, UnitDependency e, Unit
|
|||
return unit_add_dependency(u, e, other, add_reference, mask);
|
||||
}
|
||||
|
||||
static int resolve_template(Unit *u, const char *name, const char*path, char **buf, const char **ret) {
|
||||
static int resolve_template(Unit *u, const char *name, char **buf, const char **ret) {
|
||||
int r;
|
||||
|
||||
assert(u);
|
||||
assert(name || path);
|
||||
assert(name);
|
||||
assert(buf);
|
||||
assert(ret);
|
||||
|
||||
if (!name)
|
||||
name = basename(path);
|
||||
|
||||
if (!unit_name_is_valid(name, UNIT_NAME_TEMPLATE)) {
|
||||
*buf = NULL;
|
||||
*ret = name;
|
||||
|
@ -2937,7 +2934,7 @@ int unit_add_dependency_by_name(Unit *u, UnitDependency d, const char *name, boo
|
|||
assert(u);
|
||||
assert(name);
|
||||
|
||||
r = resolve_template(u, name, NULL, &buf, &name);
|
||||
r = resolve_template(u, name, &buf, &name);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
@ -2956,7 +2953,7 @@ int unit_add_two_dependencies_by_name(Unit *u, UnitDependency d, UnitDependency
|
|||
assert(u);
|
||||
assert(name);
|
||||
|
||||
r = resolve_template(u, name, NULL, &buf, &name);
|
||||
r = resolve_template(u, name, &buf, &name);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
|
Loading…
Reference in a new issue