summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/add.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 07b16dec..bd6b1724 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -120,12 +120,12 @@ int add_prepare(pmdb_t *db, pmtrans_t *trans, PMList **data)
{
PMList *lp;
- *data = NULL;
-
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
ASSERT(data != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
+ *data = NULL;
+
/* Check dependencies
*/