@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/2193907...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint