]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/install: remove two conditionals which are always false
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 12 Dec 2018 23:57:16 +0000 (00:57 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 12 Dec 2018 23:58:27 +0000 (00:58 +0100)
commit2eded6cb2c5a7aebfafc77f9a23c1f6900da362c
treec73dd7ea35e5d416a826d30d6aade107cbe61968
parent26526f9826a4aef2e83b6dd74cbb1f47cd8fdec0
shared/install: remove two conditionals which are always false

The name argument in UnitFileInstallInfo (i->name) should always be a unit
file name, so the conditional always takes the 'else' branch.

The only call chain that links to find_symlinks_fd() is unit_file_lookup_state
→ find_symlinks_in_scope → find_symlinks → find_symlinks_fd. But
unit_file_lookup_state calls unit_name_is_valid(name), and then name is used
to construct the UnitFileInstallInfo object in install_info_discover, which just
uses the name it was given.
src/shared/install.c