if (!path)
return -ENOMEM;
- q = create_symlink(&lp, "/dev/null", path, !!(flags & UNIT_FILE_FORCE), changes, n_changes);
+ q = create_symlink(&lp, "/dev/null", path, flags & UNIT_FILE_FORCE, changes, n_changes);
if (q < 0 && r >= 0)
r = q;
}
_cleanup_strv_free_ char **todo = NULL;
const char *config_path;
size_t n_todo = 0;
- bool dry_run;
char **i;
int r, q;
if (!config_path)
return -ENXIO;
- dry_run = !!(flags & UNIT_FILE_DRY_RUN);
+ bool dry_run = flags & UNIT_FILE_DRY_RUN;
STRV_FOREACH(i, files) {
_cleanup_free_ char *path = NULL;
if (!new_path)
return -ENOMEM;
- q = create_symlink(&lp, *i, new_path, !!(flags & UNIT_FILE_FORCE), changes, n_changes);
+ q = create_symlink(&lp, *i, new_path, flags & UNIT_FILE_FORCE, changes, n_changes);
if (q < 0 && r >= 0)
r = q;
}
if (r < 0)
return r;
- return remove_marked_symlinks(remove_symlinks_to, config_path, &lp, !!(flags & UNIT_FILE_DRY_RUN), changes, n_changes);
+ return remove_marked_symlinks(remove_symlinks_to, config_path, &lp, flags & UNIT_FILE_DRY_RUN, changes, n_changes);
}
int unit_file_reenable(
return r;
new_path = strjoina(lp.persistent_config, "/" SPECIAL_DEFAULT_TARGET);
- return create_symlink(&lp, i->path, new_path, !!(flags & UNIT_FILE_FORCE), changes, n_changes);
+ return create_symlink(&lp, i->path, new_path, flags & UNIT_FILE_FORCE, changes, n_changes);
}
int unit_file_get_default(