Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/sync.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-04-26 20:11:30 -0400
committerDan McGee <dan@archlinux.org>2007-04-27 14:53:01 -0400
commitec7d6955b821c51a28efce31268c9c23cb1b5928 (patch)
tree2845c5169b4bb0303137e31fa18ae9ac8fbc7404 /lib/libalpm/sync.c
parentdb9e10f14215ab6453cd663a62cae5bdfac3d61b (diff)
Remove FREESYNC macro and correctly type _alpm_sync_free
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r--lib/libalpm/sync.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index de235d71..73c61873 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -74,10 +74,8 @@ pmsyncpkg_t *_alpm_sync_new(int type, pmpkg_t *spkg, void *data)
return(sync);
}
-void _alpm_sync_free(void *data)
+void _alpm_sync_free(pmsyncpkg_t *sync)
{
- pmsyncpkg_t *sync = data;
-
ALPM_LOG_FUNC;
if(sync == NULL) {
@@ -90,6 +88,7 @@ void _alpm_sync_free(void *data)
FREEPKG(sync->data);
}
FREE(sync);
+ sync = NULL;
}
/* Find recommended replacements for packages during a sync.
@@ -433,7 +432,7 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync
sync = _alpm_sync_find(trans->packages, pkgname);
trans->packages = alpm_list_remove(trans->packages, sync, syncpkg_cmp, &vpkg);
- FREESYNC(vpkg);
+ _alpm_sync_free(vpkg);
}
}
}
@@ -565,7 +564,7 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync
void *vpkg;
_alpm_log(PM_LOG_DEBUG, _("removing '%s' from target list"), rsync->pkg->name);
trans->packages = alpm_list_remove(trans->packages, rsync, syncpkg_cmp, &vpkg);
- FREESYNC(vpkg);
+ _alpm_sync_free(vpkg);
continue;
}
}
@@ -602,7 +601,7 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync
void *vpkg;
_alpm_log(PM_LOG_DEBUG, _("removing '%s' from target list"), miss->depend.name);
trans->packages = alpm_list_remove(trans->packages, rsync, syncpkg_cmp, &vpkg);
- FREESYNC(vpkg);
+ _alpm_sync_free(vpkg);
}
} else {
/* abort */