Skip to content

Commit

Permalink
Eliminate code duplication from rpmdsNext()
Browse files Browse the repository at this point in the history
Now that we can, let rpmdsSetIx() take care of the details.
  • Loading branch information
pmatilai committed Mar 22, 2023
1 parent 4a2f13b commit 528a43a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/rpmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,12 +691,8 @@ int rpmdsNext(rpmds ds)
{
int i = -1;

if (ds != NULL && ++ds->i >= 0) {
if (ds->i < ds->Count) {
i = ds->i;
ds->DNEVR = _free(ds->DNEVR);
} else
ds->i = -1;
if (ds != NULL)
i = rpmdsSetIx(ds, ds->i + 1);

return i;
}
Expand Down

0 comments on commit 528a43a

Please sign in to comment.