diff options
Diffstat (limited to 'lib/rpmps.c')
-rw-r--r-- | lib/rpmps.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/rpmps.c b/lib/rpmps.c index 77843b000..acc8ae9f8 100644 --- a/lib/rpmps.c +++ b/lib/rpmps.c @@ -134,8 +134,7 @@ rpmps rpmpsFree(rpmps ps) void rpmpsAppendProblem(rpmps ps, rpmProblem prob) { - rpmProblem *p = NULL; - if (ps == NULL) return; + if (ps == NULL || prob == NULL) return; if (ps->numProblems == ps->numProblemsAlloced) { if (ps->numProblemsAlloced) @@ -146,9 +145,8 @@ void rpmpsAppendProblem(rpmps ps, rpmProblem prob) ps->numProblemsAlloced * sizeof(ps->probs)); } - p = ps->probs + ps->numProblems; + ps->probs[ps->numProblems] = rpmProblemLink(prob); ps->numProblems++; - *p = rpmProblemLink(prob); } void rpmpsAppend(rpmps ps, rpmProblemType type, |