summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-06-16 18:19:40 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-06-16 18:19:40 +0300
commit5f57e212516cc6ea5b9dd8276977d85a07eeec56 (patch)
tree26d4cb6369717d78b6351ef09c4ab64df121aad0 /python
parent7fd95d099f232a54d772379fc9769eb3c2453fed (diff)
downloadlibrpm-tizen-5f57e212516cc6ea5b9dd8276977d85a07eeec56.tar.gz
librpm-tizen-5f57e212516cc6ea5b9dd8276977d85a07eeec56.tar.bz2
librpm-tizen-5f57e212516cc6ea5b9dd8276977d85a07eeec56.zip
Eliminate now unnecessary artifacts of rpmdsNext() side-effects
Diffstat (limited to 'python')
-rw-r--r--python/rpmds-py.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/python/rpmds-py.c b/python/rpmds-py.c
index 6ea2a5928..e42b93a73 100644
--- a/python/rpmds-py.c
+++ b/python/rpmds-py.c
@@ -467,9 +467,7 @@ rpmds_subscript(rpmdsObject * s, PyObject * key)
}
ix = (int) PyInt_AsLong(key);
- /* XXX make sure that DNEVR exists. */
- rpmdsSetIx(s->ds, ix-1);
- (void) rpmdsNext(s->ds);
+ rpmdsSetIx(s->ds, ix);
return Py_BuildValue("s", rpmdsDNEVR(s->ds));
}