shared/install: rename variable for clarity
This commit is contained in:
parent
bce84e10f8
commit
9c894b8579
|
@ -3344,7 +3344,7 @@ int unit_file_get_list(
|
||||||
char **patterns) {
|
char **patterns) {
|
||||||
|
|
||||||
_cleanup_(lookup_paths_free) LookupPaths paths = {};
|
_cleanup_(lookup_paths_free) LookupPaths paths = {};
|
||||||
char **i;
|
char **dirname;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
assert(scope >= 0);
|
assert(scope >= 0);
|
||||||
|
@ -3355,16 +3355,16 @@ int unit_file_get_list(
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
STRV_FOREACH(i, paths.search_path) {
|
STRV_FOREACH(dirname, paths.search_path) {
|
||||||
_cleanup_closedir_ DIR *d = NULL;
|
_cleanup_closedir_ DIR *d = NULL;
|
||||||
struct dirent *de;
|
struct dirent *de;
|
||||||
|
|
||||||
d = opendir(*i);
|
d = opendir(*dirname);
|
||||||
if (!d) {
|
if (!d) {
|
||||||
if (errno == ENOENT)
|
if (errno == ENOENT)
|
||||||
continue;
|
continue;
|
||||||
if (IN_SET(errno, ENOTDIR, EACCES)) {
|
if (IN_SET(errno, ENOTDIR, EACCES)) {
|
||||||
log_debug_errno(errno, "Failed to open \"%s\": %m", *i);
|
log_debug_errno(errno, "Failed to open \"%s\": %m", *dirname);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3392,7 +3392,7 @@ int unit_file_get_list(
|
||||||
if (!f)
|
if (!f)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
f->path = path_make_absolute(de->d_name, *i);
|
f->path = path_make_absolute(de->d_name, *dirname);
|
||||||
if (!f->path)
|
if (!f->path)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue