bypass trans_prepare() if there is no target
This commit is contained in:
parent
f5cbbb2483
commit
3ad6393baf
1 changed files with 5 additions and 0 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Reference in a new issue