@pmatilai 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 (severity > vd->type[sinfo->type]) {
+           vd->type[sinfo->type] = severity;

Don't. Don't abuse a completely unrelated field when there's no reason to do 
so, just because you think you might get away with it. This is an internal 
struct, if you need a severity field then add it. And since it can then be used 
to aid sorting these items, maybe it'll all fall into place more naturally that 
way. For one, using a nicer data structure (now that we have plenty available) 
might make it all much saner.

This verification callback fubar was written under RHEL deadline pressure six 
years ago and isn't exactly one of my pridest moments...

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3194#pullrequestreview-2207210910
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/3194/review/2207210...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to