[Rpm-maint] [rpm-software-management/rpm] Make rpmfiSetFX() return code meaningful (PR #1917)
Panu Matilainen
notifications at github.com
Thu Feb 10 08:28:28 UTC 2022
Up to now, rpmfiSetFX() has returned the previous file index on success,
and -1 on error. Which seems okay on the outset, but on a just
initialized iterator the file index is at -1 which means the returned
-1 sometimes indicates an error and sometimes success. This is so broken
that none of the callers even try to use it (grep for it). Which is
lucky in the sense that it means we can change it.
Simply return the newly set index on success and -1 on error, it may
not be the greatest return code on earth but at least it's
non-ambiguous.
You can view, comment on, or merge this pull request online at:
https://github.com/rpm-software-management/rpm/pull/1917
-- Commit Summary --
* Make rpmfiSetFX() return code meaningful
-- File Changes --
M lib/rpmfi.c (2)
M lib/rpmfi.h (2)
-- Patch Links --
https://github.com/rpm-software-management/rpm/pull/1917.patch
https://github.com/rpm-software-management/rpm/pull/1917.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1917
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/1917 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220210/526b7c6d/attachment-0001.html>
More information about the Rpm-maint
mailing list