1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-28 02:50:16 +03:00

unit: don't check fragment_path for unit_get_unit_file_state()

We don#t really care about the fragment path for any code here, we only
care about the "id", which definitely is valid.

Hence don't check for it.
This commit is contained in:
Lennart Poettering 2025-02-26 17:58:41 +01:00
parent 562b01500d
commit 80a9d4f92c

View File

@ -4162,7 +4162,7 @@ UnitFileState unit_get_unit_file_state(Unit *u) {
assert(u);
if (u->unit_file_state >= 0 || !u->fragment_path)
if (u->unit_file_state >= 0)
return u->unit_file_state;
/* If we know this is a transient unit no need to ask the unit file state for details. Let's bypass