diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2006-01-07 19:25:28 +0100 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2006-01-07 19:25:28 +0100 |
commit | e405204915600340180cef61471471929fb0c275 (patch) | |
tree | 1f9aa6460524b97772b95c8b50db358eaa665f27 /lib/libalpm/remove.c | |
parent | fce68beaafade3453b89ade29d95e99ac172de01 (diff) | |
download | pacman-e405204915600340180cef61471471929fb0c275.tar.gz pacman-e405204915600340180cef61471471929fb0c275.tar.xz |
removed a restriction: the data parameter of XXX_prepare functions can be NULL
Diffstat (limited to 'lib/libalpm/remove.c')
-rw-r--r-- | lib/libalpm/remove.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index f6b85b8c..5b7fd418 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -78,7 +78,6 @@ int remove_prepare(pmtrans_t *trans, pmdb_t *db, PMList **data) 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)); if(!(trans->flags & (PM_TRANS_FLAG_NODEPS)) && (trans->type != PM_TRANS_TYPE_UPGRADE)) { EVENT(trans, PM_TRANS_EVT_CHECKDEPS_START, NULL, NULL); @@ -100,7 +99,9 @@ int remove_prepare(pmtrans_t *trans, pmdb_t *db, PMList **data) lp = checkdeps(db, trans->type, trans->packages); } } else { - *data = lp; + if(data) { + *data = lp; + } RET_ERR(PM_ERR_UNSATISFIED_DEPS, -1); } } |