rpm-software-management / librepo

A library providing C and Python (libcURL like) API for downloading packages and linux repository metadata in rpm-md format
http://rpm-software-management.github.io/librepo/
GNU Lesser General Public License v2.1
74 stars 91 forks source link

Covscan warnings and `fail_if` deprication (RhBug:1938782) #248

Closed kontura closed 3 years ago

kontura commented 3 years ago

Replacing all the fail_if's makes this quite big and I would say hard to review since we are going from fail_if to assert so negation of the conditions is usually needed.

For: https://bugzilla.redhat.com/show_bug.cgi?id=1938782

lukash commented 3 years ago

Wow... very hard to review the last commit. I could do it locally, but what about removing the last commit from this PR and creating a special PR for it? That way if there are only the fail_if -> asserts changes and they all pass, we have reasonable certainty the change is correct (for binary checks we can be certain, for e.g. range checks not so much, but those aren't too many).

kontura commented 3 years ago

Wow... very hard to review the last commit. I could do it locally, but what about removing the last commit from this PR and creating a special PR for it? That way if there are only the fail_if -> asserts changes and they all pass, we have reasonable certainty the change is correct (for binary checks we can be certain, for e.g. range checks not so much, but those aren't too many).

ok, I have removed the last commit from here and will make a separate PR once this is merged (since I am adding few fail_if's here).