summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/handle.c2
-rw-r--r--lib/libalpm/trans.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index d8ce9fd2..586aad1e 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -46,8 +46,6 @@ pmhandle_t *_alpm_handle_new()
{
pmhandle_t *handle;
- ALPM_LOG_FUNC;
-
CALLOC(handle, 1, sizeof(pmhandle_t), RET_ERR(PM_ERR_MEMORY, NULL));
return(handle);
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index 7affbfbd..bf9ef722 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -58,6 +58,8 @@ static int make_lock(pmhandle_t *handle)
int fd;
char *dir, *ptr;
+ ASSERT(handle->lockfile != NULL, return -1);
+
/* create the dir of the lockfile first */
dir = strdup(handle->lockfile);
ptr = strrchr(dir, '/');
@@ -110,7 +112,6 @@ int SYMEXPORT alpm_trans_init(pmtransflag_t flags,
/* Sanity checks */
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
-
ASSERT(handle->trans == NULL, RET_ERR(PM_ERR_TRANS_NOT_NULL, -1));
/* lock db */