mirror of
https://github.com/systemd/systemd
synced 2024-09-16 06:43:18 +00:00
analyze: return earlier when there is no path to be prepended
Follow-up for 2f6181ad4d
.
Addresses the post-merge comment:
https://github.com/systemd/systemd/pull/30172#discussion_r1404209035
This commit is contained in:
parent
fd097a79d5
commit
33d11a2b69
|
@ -98,13 +98,13 @@ int verify_set_unit_path(char **filenames) {
|
|||
return r;
|
||||
}
|
||||
|
||||
if (strv_isempty(ans))
|
||||
return 0;
|
||||
|
||||
joined = strv_join(strv_uniq(ans), ":");
|
||||
if (!joined)
|
||||
return -ENOMEM;
|
||||
|
||||
if (isempty(joined))
|
||||
return 0;
|
||||
|
||||
/* First, prepend our directories. Second, if some path was specified, use that, and
|
||||
* otherwise use the defaults. Any duplicates will be filtered out in path-lookup.c.
|
||||
* Treat explicit empty path to mean that nothing should be appended. */
|
||||
|
|
Loading…
Reference in a new issue