fix: changed to bool everywhere, added more clear variable name

This commit is contained in:
jgomez 2025-02-09 13:11:51 +01:00
parent c6e7797d4d
commit 2adbb6e4de

View file

@ -164,9 +164,9 @@ static void remove_prepare_keep_needed(alpm_handle_t *handle, alpm_list_t *lp)
* *
* @return false when no optdepends of other packages are going to be removed, true in case it will remove optdepends of other packages * @return false when no optdepends of other packages are going to be removed, true in case it will remove optdepends of other packages
*/ */
static int remove_notify_needed_optdepends(alpm_handle_t *handle, alpm_list_t *lp) static bool remove_notify_needed_optdepends(alpm_handle_t *handle, alpm_list_t *lp)
{ {
int result = 0; bool deleting_optdepends = false;
alpm_list_t *i; alpm_list_t *i;
for(i = _alpm_db_get_pkgcache(handle->db_local); i; i = alpm_list_next(i)) { for(i = _alpm_db_get_pkgcache(handle->db_local); i; i = alpm_list_next(i)) {
@ -184,7 +184,7 @@ static int remove_notify_needed_optdepends(alpm_handle_t *handle, alpm_list_t *l
.pkg = pkg, .pkg = pkg,
.optdep = optdep .optdep = optdep
}; };
result = 1; deleting_optdepends = true;
EVENT(handle, &event); EVENT(handle, &event);
} }
free(optstring); free(optstring);
@ -192,7 +192,7 @@ static int remove_notify_needed_optdepends(alpm_handle_t *handle, alpm_list_t *l
} }
} }
return result; return deleting_optdepends;
} }
/** /**