mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-08 12:28:00 -05:00
code cleanup
This commit is contained in:
parent
5a13de80a1
commit
abbb2cfcf0
@ -68,6 +68,9 @@ int alpm_initialize(char *root)
|
|||||||
ASSERT(handle == NULL, RET_ERR(PM_ERR_HANDLE_NOT_NULL, -1));
|
ASSERT(handle == NULL, RET_ERR(PM_ERR_HANDLE_NOT_NULL, -1));
|
||||||
|
|
||||||
handle = handle_new();
|
handle = handle_new();
|
||||||
|
if(handle == NULL) {
|
||||||
|
RET_ERR(PM_ERR_MEM_ERROR, -1);
|
||||||
|
}
|
||||||
|
|
||||||
/* lock db */
|
/* lock db */
|
||||||
if(handle->access == PM_ACCESS_RW) {
|
if(handle->access == PM_ACCESS_RW) {
|
||||||
@ -440,9 +443,6 @@ int alpm_pkg_load(char *filename, pmpkg_t **pkg)
|
|||||||
|
|
||||||
void alpm_pkg_free(pmpkg_t *pkg)
|
void alpm_pkg_free(pmpkg_t *pkg)
|
||||||
{
|
{
|
||||||
if(pkg == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
pkg_free(pkg);
|
pkg_free(pkg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -699,11 +699,7 @@ void *alpm_list_getdata(PMList *entry)
|
|||||||
|
|
||||||
int alpm_list_free(PMList *entry)
|
int alpm_list_free(PMList *entry)
|
||||||
{
|
{
|
||||||
if(entry) {
|
FREELIST(entry);
|
||||||
/* ORE
|
|
||||||
does not free all memory for packages... */
|
|
||||||
FREELIST(entry);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user