diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2023-03-22 10:36:45 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2023-03-22 11:17:45 +0200 |
commit | aa46fd77f2b78722a4cc47386ce3709be5b1fccd (patch) | |
tree | 8a3c6c48462397db20bf58a2fdc885705b048980 /include | |
parent | 8d918dd9f0cff01eb16f21da8e9ae663937edf59 (diff) | |
download | rpm-aa46fd77f2b78722a4cc47386ce3709be5b1fccd.tar.gz |
Make rpmdsSetIx() somewhat sane
rpmdsSetIx() has shared the same flaw that was fixed for rpmfiSetFX()
in commit 318efbaec80a90f1d9ac76d0cd433f6ea3c103fa: sometimes -1 means
success and sometimes it means error. And like in that case, this is so
broken that nobody can have relied on the behavior (we had one internal
user which was lucky if anything).
At least as bad is that it never actually bothered to check whether the
newly set index is valid.
Diffstat (limited to 'include')
-rw-r--r-- | include/rpm/rpmds.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/rpm/rpmds.h b/include/rpm/rpmds.h index b9129ad75..9814ae2b1 100644 --- a/include/rpm/rpmds.h +++ b/include/rpm/rpmds.h @@ -200,7 +200,7 @@ int rpmdsIx(const rpmds ds); * Set dependency set index. * @param ds dependency set * @param ix new index - * @return current index + * @return new index, -1 on error */ int rpmdsSetIx(rpmds ds, int ix); |