From fd6ce1f4cb8011756f7c07d28c5e06ce0be1acb7 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Mon, 9 Jan 2006 20:16:00 +0000 Subject: - merged pkg_new and pkg_dummy functions - renamed _alpm_log_action to _alpm_logaction --- lib/libalpm/add.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/libalpm/add.c') diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index d683877d..e2276695 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -71,7 +71,7 @@ int add_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name) */ if(strchr(name, '|')) { char *str, *ptr, *p; - dummy = pkg_new(); + dummy = pkg_new(NULL, NULL); if(dummy == NULL) { pm_errno = PM_ERR_MEMORY; goto error; @@ -339,10 +339,8 @@ int add_commit(pmtrans_t *trans, pmdb_t *db) _alpm_log(PM_LOG_FLOW1, "upgrading package %s-%s", info->name, info->version); /* we'll need to save some record for backup checks later */ - oldpkg = pkg_new(); + oldpkg = pkg_new(local->name, local->version); if(oldpkg) { - strncpy(oldpkg->name, local->name, PKG_NAME_LEN); - strncpy(oldpkg->version, local->version, PKG_VERSION_LEN); if(!(local->infolevel & INFRQ_FILES)) { char name[PKG_FULLNAME_LEN]; snprintf(name, PKG_FULLNAME_LEN, "%s-%s", local->name, local->version); -- cgit v1.2.3