mirror of
https://github.com/systemd/systemd
synced 2024-07-21 18:24:38 +00:00
unit-file: avoid (null) in debugging logs
The variable `inst` was set to NULL by TAKE_PTR(). This fixes the following log message: ``` systemd[1]: Unit getty@tty2.service has alias (null). ```
This commit is contained in:
parent
978642b633
commit
7c35b78a0b
|
@ -697,12 +697,9 @@ static int add_names(
|
|||
continue;
|
||||
}
|
||||
|
||||
r = set_consume(*names, TAKE_PTR(inst));
|
||||
if (r > 0)
|
||||
log_debug("Unit %s has alias %s.", unit_name, inst);
|
||||
r = add_name(unit_name, names, inst);
|
||||
} else
|
||||
r = add_name(unit_name, names, *alias);
|
||||
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue