Skip to content

Commit

Permalink
unit-file,portable: replace streq + basename with path_equal_filename
Browse files Browse the repository at this point in the history
  • Loading branch information
YHNdnzj committed May 10, 2024
1 parent ae1271d commit 5d680d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/basic/unit-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ static int add_names(

if (inst_fragment &&
fragment_basename &&
!streq(basename(inst_fragment), fragment_basename)) {
!path_equal_filename(inst_fragment, fragment_basename)) {
log_debug("Instance %s has fragment %s and is not an alias of %s.",
inst, inst_fragment, unit_name);
continue;
Expand Down
2 changes: 1 addition & 1 deletion src/portable/portabled-image-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ static int normalize_portable_changes(
bool found = false;

for (size_t j = 0; j < n_changes_attached; ++j)
if (streq(basename(changes_detached[i].path), basename(changes_attached[j].path))) {
if (path_equal_filename(changes_detached[i].path, changes_attached[j].path)) {
found = true;
break;
}
Expand Down

0 comments on commit 5d680d1

Please sign in to comment.