bypass trans_prepare() if there is no target

This commit is contained in:
Aurelien Foret 2005-04-20 19:39:41 +00:00
parent f5cbbb2483
commit 3ad6393baf

View file

@ -145,6 +145,11 @@ int trans_prepare(pmtrans_t *trans, PMList **data)
/* Sanity checks */ /* Sanity checks */
ASSERT(trans != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1)); ASSERT(trans != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
/* If there's nothing to do, return without complaining */
if(trans->packages == NULL) {
return(0);
}
switch(trans->type) { switch(trans->type) {
case PM_TRANS_TYPE_ADD: case PM_TRANS_TYPE_ADD:
case PM_TRANS_TYPE_UPGRADE: case PM_TRANS_TYPE_UPGRADE: