- Avoids callers having to separately test for number of problems
and freeing when no problems exist
rpmpsFree(teprobs);
}
pi = rpmtsiFree(pi);
+
+ /* Return NULL on no problems instead of an empty set */
+ if (rpmpsNumProblems(ps) == 0) {
+ ps = rpmpsFree(ps);
+ }
+
return ps;
}
/** \ingroup rpmts
* Return current transaction set problems.
* @param ts transaction set
- * @return current problem set (or NULL)
+ * @return current problem set (or NULL if no problems)
*/
rpmps rpmtsProblems(rpmts ts);