summaryrefslogtreecommitdiff
path: root/lib/libalpm/trans.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-01 12:13:49 -0500
committerDan McGee <dan@archlinux.org>2011-06-01 12:13:49 -0500
commit41da2253366b6f641fc3e986817ee617c9e18df3 (patch)
treec0ef91021a88bd663905a170087a7cbfec874436 /lib/libalpm/trans.c
parentfe9804a96d9e50a44e549c7be9189152e20893c5 (diff)
parentaad57cc06ac60dc8fdcff9bea811e990d64f74d3 (diff)
downloadpacman-41da2253366b6f641fc3e986817ee617c9e18df3.tar.xz
Merge branch 'maint'
Diffstat (limited to 'lib/libalpm/trans.c')
-rw-r--r--lib/libalpm/trans.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index af1bccee..5ffb5df2 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -54,6 +54,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, '/');
@@ -106,7 +108,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 */