[Rpm-maint] [rpm-software-management/rpm] Fix sinfoCmp to order signatures correctly (PR #3194)
Michal Domonkos
notifications at github.com
Tue Jul 23 12:56:07 UTC 2024
@dmnks commented on this pull request.
> /* Take care not to override a previous failure with success */
- if (res > vd->type[sinfo->type])
- vd->type[sinfo->type] = res;
+ if (sinfo->rc > vd->type[sinfo->type]) {
+ vd->type[sinfo->type] = sinfo->rc;
+ for (int type=0; type < 3; type++) {
+ if (type != sinfo->type && vd->type[type] >= sinfo->rc)
+ return 1;
We will still fall through (to the `switch` below and thus potentially replace the error message) if the current error in `sinfo->rc` is the same or lower than what we have stored for this type so far.
> /* Take care not to override a previous failure with success */
- if (res > vd->type[sinfo->type])
- vd->type[sinfo->type] = res;
+ if (sinfo->rc > vd->type[sinfo->type]) {
+ vd->type[sinfo->type] = sinfo->rc;
+ for (int type=0; type < 3; type++) {
Maybe just use `sizeof(vd->type)` here?
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3194#pullrequestreview-2193907767
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3194/review/2193907767 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240723/161c8635/attachment-0001.html>
More information about the Rpm-maint
mailing list