- It can fail with eg NULL dsp passed, might as well return something
which also silences gcc
{
const struct rpmlibProvides_s * rltblp = tblp;
const struct rpmlibProvides_s * rlp;
- int xx;
+ int rc = 0;
if (rltblp == NULL)
rltblp = rpmlibProvides;
- for (rlp = rltblp; rlp->featureName != NULL; rlp++) {
+ for (rlp = rltblp; rlp->featureName != NULL && rc == 0; rlp++) {
rpmds ds = rpmdsSingle(RPMTAG_PROVIDENAME, rlp->featureName,
rlp->featureEVR, rlp->featureFlags);
- xx = rpmdsMerge(dsp, ds);
+ rc = rpmdsMerge(dsp, ds);
ds = rpmdsFree(ds);
}
- return 0;
+ return rc;
}